Beispiel #1
0
        public async Task Invite(SocketCommandContext context, string[] _0, ServerConfig _1)
        {
            var app = await discordClient.GetApplicationInfoAsync();

            var invite = $"https://discordapp.com/api/oauth2/authorize?client_id={app.Id}&permissions=0&scope=bot";
            await context.Reply(invite);
        }
Beispiel #2
0
 protected CommandHelpService(
     IDiscordClient client,
     CommandService cmdService,
     InteractionService interactService
     )
 {
     _client          = client;
     _cmdService      = cmdService;
     _interactService = interactService;
     _ownerIdTask     = client.GetApplicationInfoAsync().ContinueWith(task => task.Result.Owner.Id);
     _commandsTask    = Task.FromResult(
         _cmdService.Commands
         .SortedMerge(
             OrderByDirection.Ascending, this,
             _interactService.SlashCommands,
             _interactService.ContextCommands,
             _interactService.ComponentCommands
             )
         );
 }