Esempio n. 1
0
        internal static Task Main(DiscordClient Bot, MessageCreateEventArgs Message_Objects)
        {
            Log.Debug("MessageEvent " + "Start...");

            MessageLog.Main(Message_Objects).ConfigureAwait(false);

            AwaitMessageProcess(Message_Objects).ConfigureAwait(false);

            // If someone talks to you while you are waiting for a message, it will count as Level.
            if (!Message_Objects.Message.Author.IsBot &&
                !Message_Objects.Channel.IsPrivate &&
                !LevelSystem_Queue.Contains(Message_Objects.Channel.Id) &&
                Database.DatabaseMethods.GuildConfigMethods.LevelSwitchFind(Message_Objects.Guild.Id))
            {
                Task.Run(() => LevelSystemInit(Bot, Message_Objects)).ConfigureAwait(false);
            }
            else
            {
                Log.Debug("Exist Task");
            }

            CommandRegister.Start(Bot, Message_Objects).ConfigureAwait(false);

            Log.Debug("MessageEvent " + "End...");

            return(Task.CompletedTask);
        }