Exemplo n.º 1
0
        public async Task Discord_GuildAvailable(GuildCreateEventArgs e)
        {
            this.GameGuard = new Timer(TimerCallback, null, TimeSpan.FromMinutes(0), TimeSpan.FromMinutes(15));

            this.Discord.DebugLogger.LogMessage(LogLevel.Info, "DSPlus", $"Guild available: {e.Guild.Name}", DateTime.UtcNow);

            if (e.Guild.Id == 312918289988976653)
            {
                RPClass.GuildRankingChannel   = e.Guild.GetChannel(312964153197330433);
                RPClass.HeroRankingChannel    = e.Guild.GetChannel(315048564525105153);
                RPClass.VillainRankingChannel = e.Guild.GetChannel(315048584007385093);
                RPClass.RogueRankingChannel   = e.Guild.GetChannel(371782656716832769);
                RPClass.AcademyRankingChannel = e.Guild.GetChannel(402966763022712843);
                RPClass.ApprovalsCategory     = e.Guild.GetChannel(510382933652144138);
                RPClass.InstanceCategory      = e.Guild.GetChannel(513361784955207701);
                RPClass.StatsChannel          = e.Guild.GetChannel(312964092748890114);
                RPClass.FameChannel           = e.Guild.GetChannel(465218787768270848);
                RPClass.GameChannel           = e.Guild.GetChannel(378770557757423617);
                RPClass.StaffRole             = e.Guild.GetRole(415936404598685721);
                RPClass.HelpfulRole           = e.Guild.GetRole(312979390516559885);
                RPClass.MuteRole   = e.Guild.GetRole(379163684276142091);
                RPClass.AdminRole  = e.Guild.GetRole(312961839359328266);
                RPClass.RPLockRole = e.Guild.GetRole(516706421316780034);
                FameRoles.Init(e.Guild);
                RPClass.RPGuild = e.Guild;

                await RPClass.AddOrUpdateUsers(RPClass.RPGuild, true);

                if (RPClass.Restarted)
                {
                    DiscordChannel c  = e.Guild.GetChannel(404108476835430401);
                    DiscordMember  me = await e.Guild.GetMemberAsync(126070623855312896);

                    await c.SendMessageAsync("Restarted successfully, " + me.Mention + "!");
                }
            }
        }
Exemplo n.º 2
0
        public async Task Update(CommandContext e)
        {
            await RPClass.AddOrUpdateUsers(e.Guild, true);

            await e.RespondAsync("Done!");
        }
Exemplo n.º 3
0
        private async Task CommandsNextService_CommandExecuted(CommandExecutionEventArgs e)
        {
            await RPClass.AddOrUpdateUsers(e.Context.Guild, false);

            Discord.DebugLogger.LogMessage(LogLevel.Info, "CommandsNext", $"{e.Context.User.Username} executed {e.Command.Name} in {e.Context.Channel.Name}", DateTime.UtcNow);
        }