private void onInitialize(EventArgs args) { Config = ConfigFile.Read(); ChatHandler.Config = Config; Commands.ChatCommands.Add(new TShockAPI.Command(Permissions.Use, doDiscord, "bridge", "discord")); Client = new BridgeClient(this); // Install the command service Client.UsingCommands(x => { x.PrefixChar = Config.BotPrefix; x.HelpMode = HelpMode.Private; x.CustomPrefixHandler = m => { // Do not require a prefix for private message commands (not counting bots, naturally) if (!m.User.IsBot && m.Channel.IsPrivate && m.Channel == m.User.PrivateChannel) { return(0); } else { return(-1); } }; }); initDiscordCommands(); Logins = new LoginManager(Client); }