Ejemplo n.º 1
0
        public async Task AutoRoleSetIcon([Remainder] string message)
        {
            var persistence = AutoRole.Load(Context.Guild.Id);

            persistence.SetAutoRoleIcon(message);
            persistence.Save();
            await ReplyAsync($"The new auto role icon for this server is '{persistence.GetAutoRoleIcon()}'");
        }
Ejemplo n.º 2
0
 private async Task RemoveRole(SocketGuildUser user)
 {
     if (user.Activity == null)
     {
         return;
     }
     if (user.Activity.Type != ActivityType.Playing)
     {
         return;
     }
     var autoRole = AutoRole.Load(user.Guild.Id);
     var game     = user.Activity.Name;
     var roles    = user.Roles.Where(r => autoRole.IsAutoRole(r) && r.Name.ContainsIgnoreCase(game));
     await user.RemoveRolesAsync(roles);
 }
Ejemplo n.º 3
0
        public async Task DefaultAutoRole()
        {
            await ReplyAsync(
                $@"The current auto role icon for this server is '{AutoRole.Load(Context.Guild.Id).GetAutoRoleIcon()}'.
You can check 'http://unicode.org/emoji/charts/full-emoji-list.html' for the icon to paste in the channel name.");
        }