Esempio n. 1
0
        /// <summary>
        /// Invoked when a GUILD_CREATE event is fired from Discord's WebSocket server.
        /// </summary>
        /// <param name="response">JSON response.</param>
        public void GuildCreated(string response)
        {
            GuildCreate guild = serializer.Deserialize <GuildCreate>(response);
            DiscordOnGuildCreateEventArgs args = new DiscordOnGuildCreateEventArgs()
            {
                Guild = guild.EventData
            };

            OnGuildCreateNotify(args);
        }
Esempio n. 2
0
        protected void OnGuildCreateNotify(DiscordOnGuildCreateEventArgs e)
        {
            EventHandler <DiscordOnGuildCreateEventArgs> handler = OnGuildCreate;

            handler?.Invoke(this, e);
        }