Skip to content

Commit

Permalink
fix: not booting (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomassasovsky authored Oct 1, 2023
1 parent 80773e3 commit b8d72d6
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
14 changes: 13 additions & 1 deletion bin/radio_horizon_production.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import 'dart:async';

import 'package:logging/logging.dart';
import 'package:nyxx/nyxx.dart';
import 'package:nyxx_commands/nyxx_commands.dart';
import 'package:radio_horizon/radio_horizon.dart';
Expand All @@ -20,7 +21,13 @@ Future<void> main() async {
await Sentry.init(
(options) {
options
..dsn = dotEnvFlavour.dotenv['SENTRY_DSN']
..dsn = sentryDsn
..environment = dotEnvFlavour.name
..release = packageVersion
..debug = dotEnvFlavour == DotEnvFlavour.development
..attachStacktrace = true
..sampleRate = 1.0
..sendDefaultPii = true
..tracesSampleRate = 1.0
..addIntegration(LoggingIntegration());
},
Expand Down Expand Up @@ -61,6 +68,11 @@ Future<void> main() async {
// Connect
await client.connect();
}, (exception, stackTrace) async {
Logger('main').severe(
'Uncaught exception when initialising the bot',
exception,
stackTrace,
);
await Sentry.captureException(exception, stackTrace: stackTrace);
});
}
3 changes: 3 additions & 0 deletions lib/src/settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ bool useSSL = getEnvBool('LAVALINK_USE_SSL', def: false);
String rapidapiShazamSongRecognizerKey =
getEnv('RAPIDAPI_SHAZAM_SONG_RECOGNIZER_KEY');

/// The Sentry DSN to use for this instance.
String sentryDsn = getEnv('SENTRY_DSN');

/// The basic intents needed to run Radio Horizon without privileged intents.
const int intents = GatewayIntents.directMessages |
GatewayIntents.guilds |
Expand Down
2 changes: 1 addition & 1 deletion lib/src/version.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: radio_horizon
description: Radio Horizon discord bot.
version: 1.0.0+1
version: 1.2.1
homepage: https://github.com/tomassasovsky/radio_horizon
repository: https://github.com/tomassasovsky/radio_horizon
documentation: https://github.com/tomassasovsky/radio_horizon
Expand Down

0 comments on commit b8d72d6

Please sign in to comment.