mirror of
https://github.com/ION606/custom_discordjs.git
synced 2026-05-14 22:26:54 +00:00
added message reactions
This commit is contained in:
@@ -102,17 +102,21 @@ export class message extends DataManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
delete() {
|
async delete() {
|
||||||
return new Promise(async (resolve, reject) => {
|
|
||||||
try {
|
try {
|
||||||
const response = await this.client.axiosCustom.delete(`/channels/${this.channel.id}/messages/${this.id}`);
|
const response = await this.client.axiosCustom.delete(`/channels/${this.channel.id}/messages/${this.id}`);
|
||||||
|
return response.data;
|
||||||
resolve(response.data);
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
reject(err);
|
throw err;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
|
||||||
|
/**
|
||||||
|
* @param {string} reaction
|
||||||
|
*/
|
||||||
|
async react(reaction) {
|
||||||
|
this.axiosCustom.put(`/channels/${this.channel.id}/messages/${this.id}/reactions/${reaction}/@me`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user