File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 11const HypixelDiscordChatBridgeError = require ( "../../contracts/errorHandler.js" ) ;
2+ const delay = ( ms ) => new Promise ( ( resolve ) => setTimeout ( resolve , ms ) ) ;
23const { SuccessEmbed } = require ( "../../contracts/embedHandler.js" ) ;
34
45module . exports = {
@@ -35,13 +36,17 @@ module.exports = {
3536 const name = interaction . options . getString ( "username" ) ;
3637 const arg = interaction . options . getString ( "arg" ) . toLowerCase ( ) ;
3738
39+ bot . chat ( "/lobby megawalls" ) ;
40+ await delay ( 250 ) ;
3841 if ( arg == "add" ) {
3942 bot . chat ( `/ignore add ${ name } ` ) ;
4043 } else if ( arg == "remove" ) {
4144 bot . chat ( `/ignore remove ${ name } ` ) ;
4245 } else {
4346 throw new HypixelDiscordChatBridgeError ( "Invalid Usage: `/ignore [add/remove] [name]`." ) ;
4447 }
48+ await delay ( 250 ) ;
49+ bot . chat ( "/limbo" ) ;
4550
4651 const embed = new SuccessEmbed (
4752 `Successfully ${ arg == "add" ? "added" : "removed" } \`${ name } \` ${ arg == "add" ? "to" : "from" } the blacklist.` ,
Original file line number Diff line number Diff line change @@ -848,16 +848,17 @@ class StateHandler extends eventHandler {
848848
849849 isAlreadyBlacklistedMessage ( message ) {
850850 return (
851- message . includes ( `You've already ignored that player! /ignore remove Player to unignore them!` ) &&
851+ message . includes ( `You've already blocked that player! /block remove <player> to unblock them!` ) &&
852852 ! message . includes ( ":" )
853853 ) ;
854854 }
855+
855856 isBlacklistRemovedMessage ( message ) {
856- return message . startsWith ( "Removed " ) && message . includes ( "from your ignore list .") && ! message . includes ( ":" ) ;
857+ return message . startsWith ( "Unblocked " ) && message . endsWith ( " .") && ! message . includes ( ":" ) ;
857858 }
858859
859860 isBlacklistMessage ( message ) {
860- return message . startsWith ( "Added " ) && message . includes ( "to your ignore list .") && ! message . includes ( ":" ) ;
861+ return message . startsWith ( "Blocked " ) && message . endsWith ( " .") && ! message . includes ( ":" ) ;
861862 }
862863
863864 isGuildMessage ( message ) {
@@ -1082,7 +1083,7 @@ class StateHandler extends eventHandler {
10821083 return ;
10831084 }
10841085
1085- const linkedUser = Object . values ( linked ) . find ( ( u ) => player )
1086+ const linkedUser = Object . values ( linked ) . find ( ( u ) => player ) ;
10861087 if ( linkedUser === undefined ) {
10871088 return ;
10881089 }
You can’t perform that action at this time.
0 commit comments