From 2aae92406a5e088e9ad76c6793a233c43975ea80 Mon Sep 17 00:00:00 2001 From: Ske Date: Tue, 16 Jul 2019 01:28:55 +0200 Subject: [PATCH] Remove Sentry scope setup for now --- PluralKit.Bot/Bot.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/PluralKit.Bot/Bot.cs b/PluralKit.Bot/Bot.cs index 16d2ffcd..f97cd1d6 100644 --- a/PluralKit.Bot/Bot.cs +++ b/PluralKit.Bot/Bot.cs @@ -91,8 +91,7 @@ namespace PluralKit.Bot .AddTransient() .AddTransient() .AddTransient() - - .AddScoped(_ => HubAdapter.Instance) + .BuildServiceProvider(); } class Bot @@ -102,15 +101,13 @@ namespace PluralKit.Bot private CommandService _commands; private ProxyService _proxy; private Timer _updateTimer; - private IHub _hub; - public Bot(IServiceProvider services, IDiscordClient client, CommandService commands, ProxyService proxy, IHub hub) + public Bot(IServiceProvider services, IDiscordClient client, CommandService commands, ProxyService proxy) { this._services = services; this._client = client as DiscordShardedClient; this._commands = commands; this._proxy = proxy; - _hub = hub; } public async Task Init() @@ -176,7 +173,6 @@ namespace PluralKit.Bot // until we properly connect. TODO: can we do this without chucking away a bunch of messages? if (_client.CurrentUser == null) return; - using (SentrySdk.PushScope()) using (var serviceScope = _services.CreateScope()) { SentrySdk.AddBreadcrumb("event.message", data: new Dictionary()