Beispiel #1
0
        public async Task AddGuildPrefix(CommandContext ctx, string newprefix)
        {
            var gp = await PrefixDB.GetGuildPrefixes(ctx.Guild.Id);

            if (gp.Contains(newprefix))
            {
                await ctx.RespondAsync(embed : new DiscordEmbedBuilder().WithTitle("Add Guild Prefix").WithDescription("**Error** This guild already has this prefix").Build());

                return;
            }
            await PrefixDB.AddGuildPrefix(ctx.Guild.Id, newprefix);

            await ctx.RespondAsync(embed : new DiscordEmbedBuilder().WithTitle("Add Prefix").WithDescription($"Added guild prefix: {newprefix}").Build());
        }
Beispiel #2
0
        public async Task RemoveGlobalPrefix(CommandContext ctx, string prefix)
        {
            var gp = await PrefixDB.GetGuildPrefixes(ctx.Guild.Id);

            if (!gp.Contains(prefix))
            {
                await ctx.RespondAsync(embed : new DiscordEmbedBuilder().WithTitle("Remove Guild Prefix").WithDescription($"**Error** This guild doesnt have: {prefix} as prefix").Build());

                return;
            }
            await PrefixDB.RemoveGuildPrefix(ctx.Guild.Id, prefix);

            await ctx.RespondAsync(embed : new DiscordEmbedBuilder().WithTitle("Remove Guild Prefix").WithDescription($"Removed guild prefix: {prefix}").Build());
        }
Beispiel #3
0
        public async Task ListPrefixes(CommandContext ctx)
        {
            var gld = await PrefixDB.GetGuildPrefixes(ctx.Guild.Id);

            var usr = await PrefixDB.GetAllUserPrefixes(ctx.User.Id);
        }