Esempio 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()}'");
        }
Esempio 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);
 }
Esempio 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.");
        }