Example #1
0
                public async Task TimerHourModule()
                {
                    try
                    {
                        if (!Privileg.CheckById(Context.User.Id, Privileg.owner))
                        {
                            await Context.Channel.SendMessageAsync(embed : Classes.Embed.New(Context.Message.Author, Field.CreateFieldBuilder("warning", "You are not my god!"), Colors.warning));

                            Log.Warning($"command - admin timer hour - user:{Context.User.Id} channel:{Context.Channel.Id} privileg to low");
                            return;
                        }

                        Log.Information($"command - admin timer hour - start user:{Context.User.Id} channel:{Context.Channel.Id} command:{Context.Message.Content}");

                        Repetitive_Timer.Hourly_timer_Elapsed(null, null);

                        await Context.Channel.SendMessageAsync(embed : Classes.Embed.New(Context.Message.Author, Field.CreateFieldBuilder("info", "timer hour done!"), Colors.information));
                    }
                    catch (Exception ex)
                    {
                        Log.Error($"command - admin timer hour - user:{Context.User.Id} channel:{Context.Channel.Id} error:{ex.Message}");
                    }
                }