Here is the code
/// <summary>
/// Handle Command Async
/// </summary>
private async Task HandleCommandAsync(SocketMessage arg)
{
try
{
CheckForNewGuilds();
if (arg is SocketUserMessage && arg != null)
{
DiscordWorker.Log("MESSAGE FOUND", LogType.Info);
try
{
var message = arg as SocketUserMessage;
var textchannel = arg.Channel as SocketTextChannel;
if (textchannel != null)
{
ulong guildid = textchannel.Guild.Id;
int argPos = 0;
if (m_GuildsPrefix.ContainsKey(guildid))
{
DiscordWorker.Log($"Message: + {message.Content}", LogType.Info); // *******EMPTY******
// This will always be true now.
bool doesNotHaveCharPrefix = !(message.HasCharPrefix(m_GuildsPrefix[guildid], ref argPos));
bool hasUserentioned = message.HasMentionPrefix(m_Client.CurrentUser, ref argPos);
bool isBot = message.Author.IsBot;
DiscordWorker.Log($"Does Not Have Char Prefix {doesNotHaveCharPrefix}", LogType.Info);
DiscordWorker.Log($"Has Mention prefix {hasUserentioned}", LogType.Info);
DiscordWorker.Log($"Is Bot {isBot}", LogType.Info);
if (doesNotHaveCharPrefix || hasUserentioned || isBot)
return;
var context = new SocketCommandContext(m_Client, message);