Yup! I tried adding a console.log(user.id) statement and then typing test messages into my chat. Each time I did, it returned a number like this: c85cc3bb-3635-5184-a728-5f7b081f2b92. So I’m thinking that this must be the actual ID of the message, as it changed with each message I typed.
Next step is to figure out how to delete said message. I did find this at line 177 of commands.js in the lib directory of tmi.js:
// Delete a specific message on a channel
deletemessage: function deletemessage(channel, messageUUID) {
channel = _.channel(channel);
// Send the command to the server and race the Promise against a delay..
return this._sendCommand(this._getPromiseDelay(), channel, `/delete ${messageUUID}`, (resolve, reject) => {
// Received _promiseDeletemessage event, resolve or reject..
this.once("_promiseDeletemessage", (err) => {
if (!err) { resolve([channel]); }
else { reject(err); }
});
});
},
I just need to get my syntax right for requiring commands.js in my bot in order to use this. I know that’s another library question, and I will ask it in the Discord. Posting it here anyway, just in case someone knows.