Exemplo n.º 1
0
        public override void Load(bool startup)
        {
            if (!Directory.Exists("plugins/DiscordVerify"))
            {
                Directory.CreateDirectory("plugins/DiscordVerify");
            }
            // If the directory does not exist, then we will just create it.
            if (!File.Exists("plugins/DiscordVerify/verified.txt"))
            {
                File.Create("plugins/DiscordVerify/verified.txt");
            }
            // If the file does not exist, then we will also create that file. We don't want our user to do it manually.
            verified = PlayerExtList.Load("plugins/DiscordVerify/verified.txt");
            // Purpose is not to have it break.
            OnChannelMessageEvent.Register(HandleDiscordMessage, Priority.High);

            Command.Register(new CmdVerify());
        }
Exemplo n.º 2
0
 public override void Unload(bool shutdown)
 {
     OnChannelMessageEvent.Unregister(OnMessage);
     OnConfigUpdatedEvent.Unregister(OnConfigUpdated);
 }
Exemplo n.º 3
0
 public override void Load(bool startup)
 {
     OnChannelMessageEvent.Register(OnMessage, Priority.Low);
     OnConfigUpdatedEvent.Register(OnConfigUpdated, Priority.Low);
     OnConfigUpdated();
 }
Exemplo n.º 4
0
        public override void Unload(bool shutdown)
        {
            OnChannelMessageEvent.Unregister(HandleDiscordMessage);

            Command.Unregister(Command.Find("Verify"));
        }