onjoin: Now works with name change announcements

This commit is contained in:
Plovie
2026-01-25 08:38:32 +08:00
parent 8c843ae46e
commit c381c8b459

View File

@@ -19,7 +19,7 @@ Example 2 (remove): ${bot.prefix}onjoin`;
}
bot.handlers.push((username) => (words) => {
if (words[1] === 'joined') {
if (words.join(' ').endsWith('joined the game')) {
bot.onjoinList = JSON.parse(
require('fs').readFileSync(
require('path').join(__dirname, 'list.json'),