mirror of
https://github.com/keanuplayz/TravBot-v3.git
synced 2024-08-15 02:33:12 +00:00
Compare commits
No commits in common. "9c2ff59a34a5893c2b4c09bc8771726d9b5cb419" and "f39a0be6c606b0bb610fc4f2d34d09726fc336b8" have entirely different histories.
9c2ff59a34
...
f39a0be6c6
1 changed files with 2 additions and 13 deletions
|
@ -11,18 +11,7 @@ export default new Command({
|
|||
let target: Message | undefined;
|
||||
let distance = 1;
|
||||
|
||||
// allows reactions by using an in-line reply
|
||||
if($.message.reference){
|
||||
const messageID = $.message.reference.messageID;
|
||||
try{
|
||||
target = await $.channel.messages.fetch(messageID!)
|
||||
}catch{
|
||||
return $.channel.send("Unknown error occurred!")
|
||||
}
|
||||
}
|
||||
|
||||
// handles reacts by message id/distance
|
||||
else if ($.args.length >= 2) {
|
||||
if ($.args.length >= 2) {
|
||||
const last = $.args[$.args.length - 1]; // Because this is optional, do not .pop() unless you're sure it's a message link indicator.
|
||||
const URLPattern = /^(?:https:\/\/discord.com\/channels\/(\d{17,19})\/(\d{17,19})\/(\d{17,19}))$/;
|
||||
const copyIDPattern = /^(?:(\d{17,19})-(\d{17,19}))$/;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue