Пример #1
0
        public void AddJoinEvent(Action <GuildEvent> info)
        {
            GuildEvent newEvent = new GuildEvent();

            info.Invoke(newEvent);
            newEvent.eventSystem = this;
            if (newEvent.Aliases.Length > 0)
            {
                foreach (string s in newEvent.Aliases)
                {
                    CommandHandler.aliases.Add(s, newEvent.Name.ToLower());
                }
            }
            Events.JoinServerEvents.Add(newEvent.Name.ToLower(), newEvent);
        }
Пример #2
0
        public void AddLeaveEvent(Action <GuildEvent> info)
        {
            GuildEvent newEvent = new GuildEvent();

            info.Invoke(newEvent);
            newEvent.eventSystem = this;
            if (newEvent.Aliases.Length > 0)
            {
                foreach (string s in newEvent.Aliases)
                {
                    aliases.Add(s, newEvent.Name.ToLower());
                }
            }
            events.LeaveServerEvents.Add(newEvent.Name.ToLower(), newEvent);

            Sql.TryCreateTable("event(name VARCHAR(255), id BIGINT, enabled BOOLEAN)");
        }