Beispiel #1
0
        public async Task MotionUnmod(CommandContext ctx, [RemainingText] string MotionBody)
        {
            bool hasProfanity = profanityFilterService.ProfanityCheck(MotionBody);

            if (hasProfanity)
            {
                await profanityFilterService.ProfanityClear(ctx.Channel, ctx.Message);

                return;
            }

            var motionChannelId = await guilds.GetGuildMotionChannel(ctx.Guild.Id);

            var channel = motionChannelId == 0 ? ctx.Channel : ctx.Guild.GetChannel(motionChannelId);

            if (motionChannelId == 0 && channel.Equals(ctx.Channel))
            {
                await channel.SendMessageAsync("Sending message here as motion channel has not been setup");
            }

            var motionEmbed = MotionBuilder.BuildMotionEmbed(ctx.Member.Username, ctx.Member.AvatarUrl, MotionType.UNMOD, MotionBody);
            var msg         = await ctx.RespondAsync(motionEmbed);

            await pollService.DoPoll(ctx, msg);
        }
Beispiel #2
0
        public async Task MotionAdjourn(CommandContext ctx)
        {
            var motionChannelId = await guilds.GetGuildMotionChannel(ctx.Guild.Id);

            var channel = motionChannelId == 0 ? ctx.Channel : ctx.Guild.GetChannel(motionChannelId);

            if (motionChannelId == 0 && channel.Equals(ctx.Channel))
            {
                await channel.SendMessageAsync("Sending message here as motion channel has not been setup");
            }

            var motionEmbed = MotionBuilder.BuildMotionEmbed(ctx.Member.Username, ctx.Member.AvatarUrl, MotionType.ADJOURN);
            await ctx.RespondAsync(motionEmbed);
        }