Why do none of the images send? RRS feed

  • Question

  • using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using Discord;
    using Discord.Commands;
    namespace Tsuyu
        class MyBot
            DiscordClient discord;
            CommandService commands;
            Random rand;
            string[] Meme;
            public MyBot()
                rand = new Random();
                Meme = new string[]
                discord = new DiscordClient(x =>
                    x.LogLevel = LogSeverity.Info;
                    x.LogHandler = Log;
                discord.UsingCommands(x =>
                    x.PrefixChar = '!';
                    x.AllowMentionPrefix = true;
                commands = discord.GetService<CommandService>();
                discord.ExecuteAndWait(async () =>
                    await discord.Connect("MzY0MzE2MDkzMTEzNjk2MjU2.DLOAig.cVZaluL-9PC1UkuCVxjSkJoU2EI", TokenType.Bot);
            private void RegistermemeCommand()
                    .Do(async (e) =>
                        int randomMemeIndex = rand.Next(Meme.Length);
                        string MemeToPost = Meme[randomMemeIndex];
                        await e.Channel.SendFile(MemeToPost);
            private void Log(object semder, LogMessageEventArgs e)

    I'm making a discord bot for my server, why do none of the memes send?

    Monday, October 2, 2017 12:09 PM

All replies

  • Hi OtakuPug,

    You could a debug pointer and go through step by step to see where program is going wrong. Hope this helps you.

    Sabah Shariq

    [If a post helps to resolve your issue, please click the "Mark as Answer" of that post or click Answered "Vote as helpful" button of that post. By marking a post as Answered or Helpful, you help others find the answer faster. ]

    Monday, October 2, 2017 12:11 PM
  • Is there anything written in the log event?

    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Monday, October 2, 2017 12:40 PM
  • There is nothing written in the log event.
    Monday, October 2, 2017 12:57 PM
  • Hi OtakuPug,

    Thank you for posting here.

    For your question, it is third party library. You could post a new thread in GitHub.


    It is not the support range of us, I will move it to off-topic.

    This forum discuss and ask the C# programming language, IDE, libraries, samples and tools. 

    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, October 3, 2017 6:22 AM