-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { Discord } from '@/discord' | ||
import { Message } from 'discord.js' | ||
import { BaseCommand, Permission } from '.' | ||
|
||
export class BasslineCommand implements BaseCommand { | ||
get name(): string { | ||
return 'bassline' | ||
} | ||
|
||
get permissions(): Permission[] | null { | ||
return null | ||
} | ||
|
||
getBasslineText(text: string = '221498004505362433'): string { | ||
const suspectName = /^\d+$/.test(text) ? `<@${text}>` : text | ||
return [ | ||
'ベースラインパーティーの途中ですが、ここで臨時ニュースをお伝えします。今日昼頃、わりとキモく女性にナンパをしたうえ、路上で爆睡をしたとして、', | ||
'道の上で寝たり、女の子に声をかけたりしたらいけないんだよ罪の容疑で、', | ||
`自称優良物件、${suspectName} 容疑者が逮捕されました。`, | ||
].join('\n') | ||
} | ||
|
||
async execute(_discord: Discord, message: Message<boolean>): Promise<void> { | ||
const [, ...suspectName] = message.content.split(' ') | ||
await message.channel.send( | ||
suspectName.length > 0 | ||
? this.getBasslineText(suspectName.join(' ')) | ||
: this.getBasslineText() | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters