Example #1
0
        public async Task <Group> GetRoleGroupAsync(DiscordGuild guild, DiscordRole role)
        {
            var engine = GetEngine(guild);
            var group  = await engine.GetGroupAsync(role.GetGroupName());

            if (group != null)
            {
                return(group);
            }

            group = new Group(engine, role.GetGroupName());
            return(await engine.AddGroupAsync(group));
        }