mirror of
https://github.com/artiemis/artemis.js.git
synced 2026-02-14 10:21:54 +00:00
enhance migration notices
This commit is contained in:
parent
c01c40336b
commit
5842a9911c
@ -11,10 +11,29 @@ export default defineEvent({
|
||||
|
||||
const command = message.content.match(/^\$[a-zA-Z]+$/);
|
||||
if (command) {
|
||||
if (
|
||||
["lens", "lenstr", "deepl"].includes(command[0].slice(1)) &&
|
||||
message.reference
|
||||
) {
|
||||
await message.reply(
|
||||
dedent`The bot has migrated to application commands!
|
||||
If you wish to OCR and/or translate someone else's message, please select the appropriate action from the context menu on their message.
|
||||
|
||||
Desktop: Right click on the message and select the action you wish to perform.
|
||||
Mobile: Long press on the message and select the action you wish to perform.
|
||||
|
||||
https://files.catbox.moe/0bo10j.png`
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
await message.reply(
|
||||
dedent`The bot has migrated to slash commands!
|
||||
|
||||
Start typing \`/\` to see the available commands.
|
||||
For example: \`/${command[0].slice(1)}\``
|
||||
For example: \`/${command[0].slice(1)}\`
|
||||
|
||||
https://files.catbox.moe/594jzd.png`
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ export function dedent(parts: TemplateStringsArray, ...values: unknown[]) {
|
||||
i < values.length ? [part, String(values[i])] : [part]
|
||||
)
|
||||
.join("")
|
||||
.replace(/(\n)\s+/g, "$1");
|
||||
.replace(/^ +/gm, "");
|
||||
}
|
||||
|
||||
export function lazy<T>(cb: () => T) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user