added message reactions

This commit is contained in:
2024-05-16 11:06:50 -07:00
parent 3d8f989a57
commit e8b8cd4c5b
+10 -6
View File
@@ -102,17 +102,21 @@ export class message extends DataManager {
}
delete() {
return new Promise(async (resolve, reject) => {
async delete() {
try {
const response = await this.client.axiosCustom.delete(`/channels/${this.channel.id}/messages/${this.id}`);
resolve(response.data);
return response.data;
} 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`);
}