Exemplo n.º 1
0
        public async Task LoadDareFromJson()
        {
            var config = GuildConfig.GetOrCreateConfig(Context.Guild.Id);

            if (!config.IsTodEnabled)
            {
                return;
            }
            var json      = TruthOrDareJson.LoadJson();
            var r         = new Random().Next(0, json.Dares.Count);
            var daresList = json.Dares.ToArray();
            var dare      = daresList[r];

            var embed = Helpers.CreateEmbed(Context, dare);

            await Helpers.SendMessage(Context, embed);
        }
Exemplo n.º 2
0
        public async Task LoadDareFromJson()
        {
            var config = GuildConfig.GetOrCreateConfig(Context.Guild.Id);

            if (!config.IsTodEnabled)
            {
                return;
            }
            var json      = TruthOrDareJson.LoadJson();
            var r         = new Random().Next(0, json.Dares.Count);
            var daresList = json.Dares.ToArray();
            var dare      = daresList[r];

            var embed = new EmbedBuilder()
                        .WithDescription(dare)
                        .WithColor(new Color(config.EmbedColour1, config.EmbedColour2, config.EmbedColour3))
                        .WithFooter(Bot.Utilities.GetFormattedLocaleMsg("CommandFooter", Context.User.Username));

            await ReplyAsync("", false, embed);
        }