public async Task ClearScouts()
        {
            //getting the user on the server to see their roles
            SocketGuild     s = _client.GetGuild(Config.SERVER_ID_MINIGAMES);
            SocketGuildUser u = s.GetUser(Context.User.Id);

            bool roleFound = false; //to output correct message

            //loopsing through roles to see if they have the correct one
            foreach (SocketRole role in u.Roles)
            {
                if (role.Name == "Admin" || s.Owner.Id == Context.User.Id)
                {
                    roleFound = true;
                }
            }
            if (roleFound)
            {
                await ReplyAsync(_bands.ClearInfo());
                await UpdateTextChannel("[" + Context.User.ToString() + "] - " + " Imformation cleared.");
            }
            else
            {
                await ReplyAsync("You do not have permission to use this!");
            }
        }
Ejemplo n.º 2
0
        //updates all info
        private async void DoUpdateAsync()
        {
            GeobieOutputFileWriter file = new GeobieOutputFileWriter(_bands.OutputForTextFile());

            _bands.ClearInfo();
            await UpdateTextChannel();
        }