chore: release v2.8.5

This commit is contained in:
March 7th 2022-10-21 18:53:09 +07:00
parent ed4375fd9d
commit e348c8e308
5 changed files with 18 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,11 +1,11 @@
{ {
"name": "discord.js-selfbot-v13", "name": "discord.js-selfbot-v13",
"version": "2.8.4", "version": "2.8.5",
"description": "A unofficial discord.js fork for creating selfbots [Based on discord.js v13]", "description": "A unofficial discord.js fork for creating selfbots [Based on discord.js v13]",
"main": "./src/index.js", "main": "./src/index.js",
"types": "./typings/index.d.ts", "types": "./typings/index.d.ts",
"scripts": { "scripts": {
"all": "npm run lint:fix && npm run lint:typings:fix && npm run fix:all && npm run build && npm publish", "all": "npm run build && npm publish",
"test": "npm run lint:all && npm run docs:test && npm run test:typescript", "test": "npm run lint:all && npm run docs:test && npm run test:typescript",
"fix:all": "npm run lint:fix && npm run lint:typings:fix && npm run format", "fix:all": "npm run lint:fix && npm run lint:typings:fix && npm run format",
"test:typescript": "tsc --noEmit && tsd", "test:typescript": "tsc --noEmit && tsd",

View File

@ -9,7 +9,7 @@ module.exports = (client, packet) => {
*/ */
const channel = client.channels.cache.get(packet.d.channel_id); const channel = client.channels.cache.get(packet.d.channel_id);
if (!channel) return; if (!channel) return;
channel._recipients = channel._recipients.push(packet.d.user); channel._recipients.push(packet.d.user);
const user = client.users._add(packet.d.user); const user = client.users._add(packet.d.user);
client.emit(Events.CHANNEL_RECIPIENT_ADD, channel, user); client.emit(Events.CHANNEL_RECIPIENT_ADD, channel, user);
}; };

View File

@ -21,6 +21,7 @@ class SessionManager extends CachedManager {
.get() .get()
.then(data => { .then(data => {
const allData = data.user_sessions; const allData = data.user_sessions;
this.cache.clear();
for (const session of allData) { for (const session of allData) {
this._add(new Session(this.client, session), true, { id: session.id_hash }); this._add(new Session(this.client, session), true, { id: session.id_hash });
} }

View File

@ -426,6 +426,19 @@ class TextBasedChannel {
* channel.sendSlash('123456789012345678', 'embed title', 'description', 'author', '#00ff00') * channel.sendSlash('123456789012345678', 'embed title', 'description', 'author', '#00ff00')
*/ */
async sendSlash(bot, commandString, ...args) { async sendSlash(bot, commandString, ...args) {
const perms = this.permissionsFor(this.client.user);
if (!perms.has('SEND_MESSAGES')) {
throw new Error(
'INTERACTION_SEND_FAILURE',
`Cannot send Slash to ${this.toString()} due to missing SEND_MESSAGES permission`,
);
}
if (!perms.has('USE_APPLICATION_COMMANDS')) {
throw new Error(
'INTERACTION_SEND_FAILURE',
`Cannot send Slash to ${this.toString()} due to missing USE_APPLICATION_COMMANDS permission`,
);
}
args = args.flat(2); args = args.flat(2);
const cmd = commandString.trim().split(' '); const cmd = commandString.trim().split(' ');
// Validate CommandName // Validate CommandName