/// <summary> /// Constructs the <see cref="HelpService"/>. /// </summary> public HelpService(DiscordBotServiceContainer services, ConfigParserService configParser, ReactionService reactions) : base(services) { this.configParser = configParser; this.reactions = reactions; }
public EnigmaModule(DiscordBotServiceContainer services, EnigmaService enigma, ConfigParserService configParser) : base(services) { this.enigma = enigma; this.configParser = configParser; }
public EnigmaService(DiscordBotServiceContainer services, ConfigParserService configParser) : base(services) { letterSet = LetterSetIO.Read(LetterSetFile); steckering = PlugboardIO.Read(letterSet.Count, PlugboardFile); rotorKeys = RotorIO.Read(RotorKeysFile); this.configParser = configParser; Client.ReactionAdded += OnReactionAddedAsync; }
public HelpModule(DiscordBotServiceContainer services, ReactionService reactions, HelpService help, ConfigParserService configParser) : base(services) { this.reactions = reactions; this.help = help; this.configParser = configParser; }
public ConfigParserService(DiscordBotServiceContainer services) : base(services) { AddToken(UsernameToken, () => Username); AddToken(NicknameToken, () => Nickname); AddToken(UserIdToken, () => UserId); AddToken(OwnerUsernameToken, () => OwnerUsername); AddToken(OwnerUserIdToken, () => OwnerUserId); AddToken(VersionToken, () => Version); AddToken(BuildDateToken, () => BuildDate); AddColor(EmbedColorName, () => EmbedColor); }
/// <summary> /// Constructs the <see cref="StatusRotationService"/>. /// </summary> public StatusRotationService(DiscordBotServiceContainer services, Random rng) : base(services) { this.rng = rng; Reload(); DiscordBot.ConfigReloaded += OnReloadAsync; Client.Connected += OnConnected; }
/// <summary> /// Constructs the <see cref="StartupService"/> /// </summary> public StartupService(DiscordBotServiceContainer services, IConfigurationRoot config, DiscordSocketClient client, CommandServiceEx commands, IDiscordBot discordBot) { Services = services; Client = client; Commands = commands; DiscordBot = discordBot; }
/// <summary> /// Constructs the <see cref="DiscordBotCommandContext"/>. /// </summary> /// <param name="services">The Discord bot service container.</param> /// <param name="client">The underlying client.</param> /// <param name="msg">The underlying message.</param> public DiscordBotCommandContext(DiscordBotServiceContainer services, DiscordSocketClient client, SocketUserMessage msg) : base(client, msg) { Services = services; if (!Contexting.IsDbLockableContext(this) && !Contexting.IsDbManagerContext(this)) { return; } using (var db = Contexting.GetCommandContextDb()) { LockContext = Contexting.FindDbLockableContextAsync(db, this, false).GetAwaiter().GetResult(); if (LockContext is IDbManagerContext manageContext) { ManageContext = manageContext; } else { ManageContext = Contexting.FindDbManagerContextAsync(db, this, false).GetAwaiter().GetResult(); } } }
/// <summary> /// Constructs the <see cref="SuperuserModule"/>. /// </summary> public SuperuserModule(DiscordBotServiceContainer services) : base(services) { }
/// <summary> /// Constructs the <see cref="LogGroup"/>. /// </summary> public LogGroup(DiscordBotServiceContainer services) : base(services) { }
public HelpGroup(DiscordBotServiceContainer services, HelpService help) : base(services) { this.help = help; }
/// <summary> /// Constructs the <see cref="ReactionService"/>. /// </summary> public ReactionService(DiscordBotServiceContainer services) : base(services) { Client.Connected += OnFirstConnectedAsync; }
/// <summary> /// Constructs the <see cref="CommandHandlerService"/>. /// </summary> public CommandHandlerService(DiscordBotServiceContainer services) : base(services) { Client.MessageReceived += OnMessageReceived; }
/// <summary> /// Constructs the <see cref="ResultHandlerService"/>. /// </summary> public ResultHandlerService(DiscordBotServiceContainer services) : base(services) { Commands.CommandExecuted += OnCommandResultAsync; }
/// <summary> /// Constructs the <see cref="DiscordBotUserWaitContext"/>. /// </summary> /// <param name="services">The Discord bot service container.</param> /// <param name="client">The underlying client.</param> /// <param name="msg">The underlying message.</param> public DiscordBotUserWaitContext(DiscordBotServiceContainer services, DiscordSocketClient client, SocketUserMessage msg, string name, TimeSpan duration) : base(client, msg, services.Commands, name, duration) { Services = services; }
/// <summary> /// Constructs the <see cref="DiscordBotUserWaitContext"/>. /// </summary> /// <param name="context">The underlying command context.</param> public DiscordBotUserWaitContext(DiscordBotCommandContext context, string name, TimeSpan duration) : base(context, context.Services.Commands, name, duration) { Services = context.Services; }
public EnigmaReactions(DiscordBotServiceContainer services) : base(services) { }
public DefaultContextingService(DiscordBotServiceContainer services) : base(services) { }
/// <summary> /// Constructs the <see cref="DiscordBotService"/>. /// </summary> /// <param name="services"></param> public DiscordBotService(DiscordBotServiceContainer services) { Services = services; }