Skip to content

Commit

Permalink
1.5.1: fix 2 bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelcmtd committed Feb 11, 2024
1 parent f40492a commit fbe0f05
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 1.5.1

- Ping the admin (pixel) by id, not name
- Don't fail if there is no custom message from any of the videos

## 1.5.0

- Added support for `JANA_DISCORD_TOKEN` environment variable instead of using args
Expand Down
5 changes: 3 additions & 2 deletions bin/jana.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void main(List<String> argv) async {
var lastLogMsg = '';
var lastLogCount = 1;
Logger.root.onRecord.listen((rec) => logMutex.protect(() async {
final ping = rec.level >= Level.WARNING ? ' @pixelcmtd' : '';
final ping = rec.level >= Level.WARNING ? ' <@231670489779666944>' : '';
var msg = '[${rec.level.name}] [${rec.loggerName}] ${rec.message}$ping';
if (rec.error != null) msg += '\nError: ${rec.error}';
if (rec.stackTrace != null) {
Expand Down Expand Up @@ -139,7 +139,8 @@ void checkYoutube(NyxxGateway bot, List<String> sent) async {
}
if (links.isNotEmpty) {
log.info('[yt] building and sending message');
final message = messages.reduce((a, b) => '$a\n$b');
final message =
messages.isEmpty ? '' : messages.reduce((a, b) => '$a\n$b');
final link = links.reduce((p, e) => '$p $e');
final msg = await news
.sendMessage(MessageBuilder(content: '@everyone $message\n$link'));
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: jana
description: A Discord bot
version: 1.5.0
version: 1.5.1
homepage: https://github.com/chrissxMedia/jana

environment:
Expand Down

0 comments on commit fbe0f05

Please sign in to comment.