mirror of
https://github.com/ION606/custom_discordjs.git
synced 2026-05-14 22:26:54 +00:00
fixed guild channels and interactions
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import axios from 'axios';
|
||||
import author from '../messages/author.js';
|
||||
import author from '../messages/User.js';
|
||||
import { Channel, message } from '../messages/message.js';
|
||||
import {Embed} from '../messages/embed.js';
|
||||
import Guild from '../guilds/Guild.js';
|
||||
|
||||
|
||||
export class Interaction {
|
||||
@@ -29,6 +30,12 @@ export class Interaction {
|
||||
/** @type {String} */
|
||||
application_id;
|
||||
|
||||
/** @type {Guild} */
|
||||
guild;
|
||||
|
||||
/** @type {String} */
|
||||
guild_id;
|
||||
|
||||
|
||||
/**
|
||||
* @param {{content: String, ephemeral?: Boolean, embeds: [Embed]} | String} inp
|
||||
@@ -166,10 +173,9 @@ export class Interaction {
|
||||
for (const k in this) {
|
||||
if (intRaw[k] != undefined) {
|
||||
if (k == "user") this[k] = new author(intRaw[k]);
|
||||
|
||||
else {
|
||||
if (k == 'channel_id') {
|
||||
this.channel = new Channel(this.#application.token, intRaw[k]);
|
||||
this.channel = new Channel(intRaw[k], this.guild, this.#application.token);
|
||||
}
|
||||
|
||||
this[k] = intRaw[k];
|
||||
|
||||
Reference in New Issue
Block a user