mirror of
https://github.com/qwerinope/qweribot.git
synced 2025-12-19 08:41:39 +01:00
remove ping command, add backshot command, add nice font to chatwidget, add first time chatting warning
This commit is contained in:
10
src/commands/backshot.ts
Normal file
10
src/commands/backshot.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { Command, sendMessage } from ".";
|
||||
import { User } from "../user";
|
||||
import { redis } from "bun";
|
||||
|
||||
export default new Command('backshot', ['backshot'], 'chatter', async (msg, user) => {
|
||||
const targets = await redis.keys(`user:*:haschatted`);
|
||||
const selection = targets[Math.floor(Math.random() * targets.length)]!;
|
||||
const target = await User.initUserId(selection.slice(5, -11));
|
||||
await sendMessage(`${user.displayName} backshotted ${target?.displayName}`, msg.messageId);
|
||||
});
|
||||
@@ -1,6 +0,0 @@
|
||||
import { Command, sendMessage } from ".";
|
||||
|
||||
// This command is purely for testing
|
||||
export default new Command('ping', ['ping'], 'chatter', async msg => {
|
||||
await sendMessage('pong!', msg.messageId);
|
||||
});
|
||||
Reference in New Issue
Block a user