Пример #1
0
        /// <inheritdoc/>
        public void Bind(DiscordBotBase value)
        {
            _binder.Bind(value);

            Bot.LeftGuild += LeftGuildAsync;
        }
Пример #2
0
 /// <summary>
 ///     Instantiates a new <see cref="DiscordCommandContext"/>.
 /// </summary>
 /// <param name="bot"> The bot instance. </param>
 /// <param name="prefix"> The prefix found in the source message. </param>
 /// <param name="message"> The source message. </param>
 /// <param name="provider"> The optional <see cref="IServiceProvider"/>. If <see langword="null"/>, defaults to <paramref name="bot"/>. </param>
 public DiscordCommandContext(DiscordBotBase bot, IPrefix prefix, CachedUserMessage message, IServiceProvider provider = null) : base(provider ?? bot)
 {
     Bot     = bot;
     Prefix  = prefix;
     Message = message;
 }