Beispiel #1
0
        public async Task GetRules()
        {
            var embed = new EmbedBuilder();

            embed = RulesModuleHelper.GetServerRulesJSON(Context.Guild.Id.ToString());

            if (embed != null)
            {
                await Context.Channel.SendMessageAsync("", false, embed.Build());
            }
            else
            {
                await Context.Channel.SendMessageAsync(":x:  Server not have any rules " + Context.User.Mention);
            }
        }
        public async Task SetRules([Remainder] string msg)
        {
            var embed = new EmbedBuilder();



            embed.WithTitle("Main Server Rules");
            embed.WithColor(new Color(0, 255, 0));
            embed.WithAuthor(Context.User);
            embed.WithDescription(msg);

            RulesModuleHelper.SaveServerRulesJSON(Context.Guild.Id.ToString(), embed);

            await Context.Channel.SendMessageAsync(Context.User.Mention + " RULES ARE SET!");
        }