Changed class format to BaseClass

This commit is contained in:
ION606
2023-04-07 20:12:16 -04:00
parent e6b32cc115
commit b6d35c8e55
11 changed files with 97 additions and 227 deletions
+3 -5
View File
@@ -40,8 +40,7 @@ export default class invite extends BaseStruct {
async delete() {
return new Promise(async (resolve) => {
try {
const headers = { Authorization: this.#token }
const response = await axios.delete(`https://discord.com/api/invites/${this.code}`, { headers });
const response = await this.client.axiosCustom.delete(`/invites/${this.code}`);
resolve(response.data);
} catch (err) {
throw err.data;
@@ -49,10 +48,9 @@ export default class invite extends BaseStruct {
});
}
constructor(o, guild, token) {
super();
constructor(o, guild, client) {
super(client);
this.#token = token;
for (const k in this) {
if (o[k]) {
if (k == 'guild') { this.guild = guild }