Compare commits

...
4 Commits
Author SHA1 Message Date
ItzEmerald 85667ddfad 7.2 pre-3 2021-10-21 19:28:23 +01:00
ItzEmerald 45c3315fd0 Update .DS_Store 2021-10-07 20:46:20 +01:00
ItzEmerald c5f550dd00 Pre-2 2021-10-07 20:46:18 +01:00
ItzEmerald 37c870c7ab SupportBot Pre-7.2
SupportBot Build for DiscordJS 13
2021-10-04 20:41:05 +01:00
3735 changed files with 4580 additions and 349593 deletions

No files matched your search

Vendored
BIN
View File
Binary file not shown.
+34
View File
@@ -0,0 +1,34 @@
// SupportBot | Emerald Services
// Example (default) Addon
const fs = require("fs");
const Discord = require("discord.js");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./Data/supportbot.yml', 'utf8'));
const cmdconfig = yaml.load(fs.readFileSync('./Data/commands.yml', 'utf8'));
// Your Addon Config file! Saved in /Addons/Settings/YourAddonConig.yml
// const exampleaddon = yaml.load(fs.readFileSync('./Addons/Settings/YourAddonConig.yml', 'utf8'));
const Command = require("../Structures/Command.js");
module.exports = new Command({
name: "hello",
description: "hello",
type: "BOTH",
slashCommandOptions: [],
permission: "SEND_MESSAGES",
async run(message, args, client) {
const Embed = new Discord.MessageEmbed()
.setDescription("Hello World!")
.setColor(supportbot.InfoColour)
message.channel.send({
embeds: [Embed]
})
}
});
+29 -18
View File
@@ -1,19 +1,30 @@
// SupportBot, Created by Emerald Services
// Add User
// SupportBot | Emerald Services
// Info Command
const Discord = require("discord.js");
const fs = require("fs");
const Discord = require("discord.js");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
const supportbot = yaml.load(fs.readFileSync('./Data/supportbot.yml', 'utf8'));
const cmdconfig = yaml.load(fs.readFileSync('./Data/commands.yml', 'utf8'));
module.exports = {
name: supportbot.AddUser,
description: supportbot.AddUserDesc,
const Command = require("../Structures/Command.js");
async function asyncForEach(array, callback) {
for (let index = 0; index < array.length; index++) {
await callback(array[index], index, array);
}
}
module.exports = new Command({
name: cmdconfig.TicketAdd,
description: cmdconfig.TicketAddDesc,
type: "BOTH",
slashCommandOptions: [],
permission: "SEND_MESSAGES",
async run(message, args, client) {
execute(message, args) {
if (supportbot.DeleteMessages) message.delete();
let SupportStaff = message.guild.roles.cache.find(SupportTeam => SupportTeam.name === supportbot.Staff) || message.guild.roles.cache.find(SupportTeam => SupportTeam.id === supportbot.Staff)
let Admins = message.guild.roles.cache.find(AdminUser => AdminUser.name === supportbot.Admin) || message.guild.roles.cache.find(AdminUser => AdminUser.id === supportbot.Admin)
@@ -33,24 +44,23 @@ module.exports = {
return;
}
let rUser = message.guild.member(message.mentions.users.first() || message.guild.members.cache.get(args[0]));
let uMember = message.mentions.users.first();
const UserNotExist = new Discord.MessageEmbed()
.setTitle("User Not Found!")
.setDescription(`${supportbot.UserNotFound}\n\nTry Again:\`${supportbot.Prefix}${supportbot.AddUser} <user#0000>\``)
.setDescription(`${supportbot.UserNotFound}\n\nTry Again:\`${supportbot.Prefix}${cmdconfig.TicketAdd} <user#0000>\``)
.setColor(supportbot.ErrorColour)
if (!rUser) return message.channel.send({ embeds: [UserNotExist] });
if (!uMember) return message.channel.send({ embeds: [UserNotExist] });
message.channel.updateOverwrite(rUser, {
message.channel.permissionOverwrites.edit(uMember, {
VIEW_CHANNEL: true,
CREATE_INVITE: false,
READ_MESSAGE_HISTORY: true,
SEND_MESSAGES: true,
READ_MESSAGES: true
});
const Complete = new Discord.MessageEmbed()
.setTitle("User Added!")
.setDescription(supportbot.AddedUser.replace(/%user%/g, rUser.id))
.setDescription(supportbot.AddedUser.replace(/%user%/g, uMember.id))
.setTimestamp()
.setColor(supportbot.EmbedColour)
message.channel.send({ embeds: [Complete] });
@@ -61,4 +71,5 @@ module.exports = {
}
}
};
});
+31 -18
View File
@@ -1,19 +1,30 @@
// SupportBot, Created by Emerald Services
// Remove User
// SupportBot | Emerald Services
// Info Command
const Discord = require("discord.js");
const fs = require("fs");
const Discord = require("discord.js");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
const supportbot = yaml.load(fs.readFileSync('./Data/supportbot.yml', 'utf8'));
const cmdconfig = yaml.load(fs.readFileSync('./Data/commands.yml', 'utf8'));
module.exports = {
name: supportbot.RemoveUser,
description: supportbot.RemoveUserDesc,
const Command = require("../Structures/Command.js");
async function asyncForEach(array, callback) {
for (let index = 0; index < array.length; index++) {
await callback(array[index], index, array);
}
}
module.exports = new Command({
name: cmdconfig.TicketRemove,
description: cmdconfig.TicketRemoveDesc,
type: "BOTH",
slashCommandOptions: [],
permission: "SEND_MESSAGES",
async run(message, args, client) {
execute(message, args) {
if (supportbot.DeleteMessages) message.delete();
let SupportStaff = message.guild.roles.cache.find(SupportTeam => SupportTeam.name === supportbot.Staff) || message.guild.roles.cache.find(SupportTeam => SupportTeam.id === supportbot.Staff)
let Admins = message.guild.roles.cache.find(AdminUser => AdminUser.name === supportbot.Admin) || message.guild.roles.cache.find(AdminUser => AdminUser.id === supportbot.Admin)
@@ -33,30 +44,32 @@ module.exports = {
return;
}
let rUser = message.guild.member(message.mentions.users.first() || message.guild.members.cache.get(args[0]));
let uMember = message.mentions.users.first();
const UserNotExist = new Discord.MessageEmbed()
.setTitle("User Not Found!")
.setDescription(`${supportbot.UserNotFound}\n\nTry Again:\`${supportbot.Prefix}${supportbot.RemoveUser} <user#0000>\``)
.setDescription(`${supportbot.UserNotFound}\n\nTry Again:\`${supportbot.Prefix}${cmdconfig.TicketRemove} <user#0000>\``)
.setColor(supportbot.ErrorColour)
if (!rUser) return message.channel.send({ embeds: [UserNotExist] });
if (!uMember) return message.channel.send({ embeds: [UserNotExist] });
message.channel.updateOverwrite(rUser, {
message.channel.permissionOverwrites.edit(uMember, {
VIEW_CHANNEL: false,
CREATE_INVITE: false,
READ_MESSAGE_HISTORY: false,
SEND_MESSAGES: false,
READ_MESSAGES: false
});
const Complete = new Discord.MessageEmbed()
.setTitle("User Removed!")
.setDescription(supportbot.RemovedUser.replace(/%user%/g, rUser.id))
.setDescription(supportbot.RemovedUser.replace(/%user%/g, uMember.id))
.setTimestamp()
.setColor(supportbot.EmbedColour)
message.channel.send({ embeds: [Complete] });
} else {
return message.channel.send({ embeds: [NoPerms] });
}
}
};
});
+23 -12
View File
@@ -1,19 +1,30 @@
// SupportBot, Created by Emerald Services
// Close Command
// SupportBot | Emerald Services
// Close Ticket Command
const Discord = require("discord.js");
const fs = require("fs");
const Discord = require("discord.js");
const yaml = require('js-yaml');
const { execute } = require("./help");
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
const supportbot = yaml.load(fs.readFileSync('./Data/supportbot.yml', 'utf8'));
const cmdconfig = yaml.load(fs.readFileSync('./Data/commands.yml', 'utf8'));
module.exports = {
name: supportbot.CloseTicket,
description: supportbot.CloseTicketDesc,
const Command = require("../Structures/Command.js");
const TicketNumberID = require('../Structures/TicketID.js');
execute(message, args) {
if (supportbot.DeleteMessages) message.delete();
async function asyncForEach(array, callback) {
for (let index = 0; index < array.length; index++) {
await callback(array[index], index, array);
}
}
module.exports = new Command({
name: cmdconfig.CloseTicket,
description: cmdconfig.CloseTicketDesc,
type: "BOTH",
slashCommandOptions: [],
permission: "SEND_MESSAGES",
async run(message, args, client) {
if (!message.channel.name.startsWith( `${supportbot.TicketChannel}-` )) {
const Exists = new Discord.MessageEmbed()
@@ -159,5 +170,5 @@ module.exports = {
}
}
};
}
});
+86
View File
@@ -0,0 +1,86 @@
// SupportBot | Emerald Services
// Close Ticket Command
const fs = require("fs");
const Discord = require("discord.js");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./Data/supportbot.yml', 'utf8'));
const cmdconfig = yaml.load(fs.readFileSync('./Data/commands.yml', 'utf8'));
const Command = require("../Structures/Command.js");
const TicketNumberID = require('../Structures/TicketID.js');
async function asyncForEach(array, callback) {
for (let index = 0; index < array.length; index++) {
await callback(array[index], index, array);
}
}
module.exports = new Command({
name: cmdconfig.HelpCommand,
description: cmdconfig.HelpCommandDesc,
type: "BOTH",
slashCommandOptions: [],
permission: "SEND_MESSAGES",
async run(message, args, client) {
let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Staff) || message.guild.roles.cache.find(staffRole => staffRole.id === supportbot.Staff);
let AdminStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Admin) || message.guild.roles.cache.find(adminRole => adminRole.id === supportbot.Admin);
if (supportbot.HelpMenu) {
let botCommands = "";
botCommands += `**${supportbot.Prefix}${cmdconfig.HelpCommand}** ${cmdconfig.HelpCommandDesc}\n`;
botCommands += `**${supportbot.Prefix}${cmdconfig.InfoCommand}** ${cmdconfig.InfoCommandDesc}\n`;
botCommands += `**${supportbot.Prefix}${cmdconfig.PingCommand}** ${cmdconfig.PingCommandDesc}\n`
let ticketCommands = "";
ticketCommands += `**${supportbot.Prefix}${cmdconfig.OpenTicket}** ${cmdconfig.OpenTicketDesc}\n`;
ticketCommands += `**${supportbot.Prefix}${cmdconfig.CloseTicket}** ${cmdconfig.CloseTicketDesc}\n`
let staffCommands = "";
staffCommands += `**${supportbot.Prefix}${cmdconfig.TicketAdd}** ${cmdconfig.TicketAddDesc}\n`
staffCommands += `**${supportbot.Prefix}${cmdconfig.TicketRemove}** ${cmdconfig.TicketRemoveDesc}\n`
const HelpEmbed1 = new Discord.MessageEmbed()
.setTitle(supportbot.Name)
.setThumbnail(message.author.displayAvatarURL())
.addFields(
{ name: '🖥️ General Commands\n', value: `${botCommands}\n`, inline: false },
{ name: '🎫 Support Commands\n', value: `${ticketCommands}\n`, inline: false },
)
.setColor(supportbot.EmbedColour)
.setFooter(supportbot.EmbedFooter, message.author.displayAvatarURL());
if (message.member.roles.cache.has(SupportStaff.id)) {
HelpEmbed1.addFields(
{ name: '🔐 Staff Commands\n', value: `${staffCommands}\n`, inline: false },
)
} else {
if ((message.member.roles.cache.has(AdminStaff.id))) {
HelpEmbed1.addFields(
{ name: '🔐 Staff Commands\n', value: `${staffCommands}\n`, inline: false },
)
}
}
if (supportbot.SendHelpPage === "dm") {
message.author.send({
embeds: [HelpEmbed1]
});
}
if (supportbot.SendHelpPage === "channel") {
message.channel.send({
embeds: [HelpEmbed1]
});
}
}
}
});
+42
View File
@@ -0,0 +1,42 @@
// SupportBot | Emerald Services
// Info Command
const fs = require("fs");
const Discord = require("discord.js");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./Data/supportbot.yml', 'utf8'));
const cmdconfig = yaml.load(fs.readFileSync('./Data/commands.yml', 'utf8'));
const Command = require("../Structures/Command.js");
module.exports = new Command({
name: cmdconfig.InfoCommand,
description: cmdconfig.InfoCommandDesc,
type: "BOTH",
slashCommandOptions: [],
permission: "SEND_MESSAGES",
async run(message, args, client) {
const InfoButton = new Discord.MessageButton()
.setLabel(supportbot.InfoButtonText)
.setURL(supportbot.InfoURL)
.setStyle('LINK')
const inforow = new Discord.MessageActionRow()
.addComponents(InfoButton)
const InfoEmbed = new Discord.MessageEmbed()
.setURL(supportbot.InfoURL)
.setTitle(supportbot.InfoTitle)
.setDescription(supportbot.AboutMe)
.setColor(supportbot.InfoColour)
message.channel.send({
embeds: [InfoEmbed], components: [inforow]
})
}
});
+1
View File
@@ -0,0 +1 @@
{}
+37
View File
@@ -0,0 +1,37 @@
# ___ _ ___ _
# / __> _ _ ___ ___ ___ _ _ _| |_ | . > ___ _| |_
# \__ \| | || . \| . \/ . \| '_> | | | . \/ . \ | |
# <___/`___|| _/| _/\___/|_| |_| |___/\___/ |_|
# |_| |_|
#
# SupportBot created by Emerald Services
# Installed with MIT License
#
# Discord Support: https:#emeraldsrv.dev/discord
# Community Resources: https:#emeraldsrv.dev/resources
# -------------------------------
# Commamnd Name Configuration
# -------------------------------
TicketAdd: "ticketadd"
TicketRemove: "ticketremove"
OpenTicket: "ticket"
CloseTicket: "close"
InfoCommand: "info"
PingCommand: "ping"
HelpCommand: "help"
# ---------------------------------------
# Commamnd Description Configuration
# ---------------------------------------
TicketAddDesc: "Add a user to a support ticket."
TicketRemoveDesc: "Remove a user from a support ticket."
OpenTicketDesc: "Open a new support ticket."
CloseTicketDesc: "Close your support ticket."
InfoCommandDesc: "Get information about the brand."
PingCommandDesc: "Pong!"
HelpCommandDesc: "Get a list of all the commands."
+189
View File
@@ -0,0 +1,189 @@
# ___ _ ___ _
# / __> _ _ ___ ___ ___ _ _ _| |_ | . > ___ _| |_
# \__ \| | || . \| . \/ . \| '_> | | | . \/ . \ | |
# <___/`___|| _/| _/\___/|_| |_| |___/\___/ |_|
# |_| |_|
#
# SupportBot created by Emerald Services
# Installed with MIT License
#
# Discord Support: https:#emeraldsrv.dev/discord
# Community Resources: https:#emeraldsrv.dev/resources
SupportBot_Version: "7.2 pre-3"
# -------------------------
# General Configuration
# -------------------------
Name: "SupportBot"
Prefix: "!"
Token: "BOT_TOKEN"
# -------------------------
# Activity Configuration
# -------------------------
BotActivity: "Need Help? -ticket"
StreamingURL: "https://www.twitch.tv/YOUR_TWITCH_NAME"
# Set The ActivityType to "STREAMING" for a streaming status!
ActivityType: "PLAYING"
# Activity status can either be PLAYING, WATCHING, LISTENING or STREAMING.
# -------------------------
# Embed Configuration
# -------------------------
EmbedColour: "#f74343"
EmbedFooter: "SupportBot | An Advanced Ticket System"
ErrorColour: "#d12519"
SuccessColour: "#04b545"
WarningColour: "#fca117"
# -------------------------
# Information Configuration
# -------------------------
InfoTitle: "Information"
AboutMe: "Hi, I'm SupportBot an advanced discord ticket bot with 100% customisation! [Download](https://emeraldsrv.dev/download)"
InfoButtonText: "Visit Site"
InfoURL: "https://emeraldsrv.dev"
InfoColour: "#f74343"
# -------------------------
# Help Configuration
# -------------------------
HelpMenu: true # Do not change!
SendHelpPage: "channel" # Set to channel or dm
# -------------------------
# Role Configuration
# -------------------------
AutoRole: true
AutoRole_Role: "Member"
LockdownRole: "@everyone"
Staff: "Support Team"
Admin: "Project Developer"
TicketBlackListRole: "Blacklisted"
# -------------------------
# Tickets Configuration
# -------------------------
TicketCategory: "▬▬ TICKETS ▬▬"
TicketChannel: "ticket"
TicketLog: "ticket-log"
TranscriptLog: "ticket-data"
TranscriptTitle: "Ticket Transcript"
TicketLog_Title: "Ticket Log"
TicketBlackListMessage: "You are not allowed to open a ticket"
TicketSubject: "description"
# "description" will displays the ticket reason within the channel description
# "embed" will displays the ticket reason within the ticket embed
AllowTicketMentions: true
# Set to true to allow the ticket to mention the author and the support team.
# Set to false to dis-allow mentions within tickets.
# --- Creation Config ---
# --- Start ---
# Available Placeholders:
# %ticketusername% - User who created the ticket.
# <@%ticketauthor%> - Tags the user who created the ticket.
# <#%ticketid%> - Mentions the ticket channel.
Ticket_Title: "Server Support | %ticketusername%"
TicketMessage: "Hello <@%ticketauthor%>, Thank you for creating a support ticket\nPlease wait patiently whilst a member of our team reaches out to you."
Ticket_Thumbnail: "https://images.emojiterra.com/google/android-pie/512px/1f39f.png"
NoTicketSubject: "No Reason Provided!"
TicketCreatedAlert: ":ticket: Your support ticket has been created: <#%ticketid%>"
AddedUser: "👍 <@%user%> has been added to this ticket"
RemovedUser: "👍 <@%user%> has been removed from this ticket"
# --- Buttons Config ---
# --- Start ---
# Discord Button Colour Selection
# PRIMARY - Blurple
# DANGER - Red
# SUCCESS - Green
# Secondary - Grey
TicketLockReaction: "🔒"
TicketDeleteReaction: "⛔"
LockTicketCategory: "Archive"
TicketCloseEmoji: "❌"
TicketDeleteEmoji: "⛔"
TicketLockEmoji: "🔒"
TicketCloseColour: "DANGER"
TicketDeleteColour: "DANGER"
TicketLockColour: "PRIMARY"
TicketDept1Colour: "PRIMARY"
TicketDept2Colour: "PRIMARY"
TicketDept3Colour: "PRIMARY"
TicketDept1Emoji: "1️⃣"
TicketDept2Emoji: "2️⃣"
TicketDept3Emoji: "3️⃣"
TranscriptSavedMessage: "📝 **Transcript Saved!**"
TicketLockMessage: "❌ **Ticket Locked!**"
TicketDeleteMessage: "⚠ **Ticket Deleting!**" # Tickets deleting after 5 seconds by default.
TicketDeleteTime: 5000 # Time must be set in miliseconds.
# --- Departments Config ---
# --- Start ---
TicketDepartments: true
AllowStaff: true
# If set to false users with the "Staff" role will not be able to view tickets
# without a valid department role set below.
# Set to false to allow "Staff" to see tickets whether its a department for them or not.
DepartmentTitle_1: "General Support"
DepartmentTitle_2: "Billing Support"
DepartmentTitle_3: "Admin Team"
# Ticket department title, This is the title for a ticket department to help users know what is available.
DepartmentRole_1: "Support Team"
DepartmentRole_2: "Support Team"
DepartmentRole_3: "Project Developer"
# Ticket roles are the roles that will be able to gain access to tickets depending on what department has been choosen.
# --- Closing Config ---
# --- Start ---
ClosingTicket: ":warning: You have requested to close your support ticket."
ClosingConfirmation_Word: "confirm"
CloseConfirmation: false
# ---------------------------
# Error / Warning Messages
# ---------------------------
IncorrectPerms: ":x: **Err!** You do not have the correct permissions to use this command."
InvalidChannel: ":x: **Err!** Channel not found. Please create it!"
UserNotFound: ":x: **Err!** This user doesn't exist, Are they in this server?"
NoValidTicket: ":warning: You cannot execute this command here."
TicketExists: ":warning: This ticket cannot be opened, It already exists!"
+1
View File
@@ -0,0 +1 @@
TicketPanelID: '896035054235574362'
+42
View File
@@ -0,0 +1,42 @@
# ___ _ ___ _
# / __> _ _ ___ ___ ___ _ _ _| |_ | . > ___ _| |_
# \__ \| | || . \| . \/ . \| '_> | | | . \/ . \ | |
# <___/`___|| _/| _/\___/|_| |_| |___/\___/ |_|
# |_| |_|
#
# SupportBot created by Emerald Services
# Installed with MIT License
#
# Discord Support: https:#emeraldsrv.dev/discord
# Community Resources: https:#emeraldsrv.dev/resources
# -------------------------------
# Ticket Panel Configuration
# -------------------------------
TicketPanel: true
# ----------------------------------------
# Ticket Panel Message Configuration
# ----------------------------------------
Channel: "create-ticket"
ButtonEmoji: "📩"
ButtonLabel: "Open Ticket"
ButtonColour: "SUCCESS"
# Colour Options:
# -> PRIMARY - Blurple
# -> SECONDARY - Grey
# -> SUCCESS - Green
# -> DANGER - Red
PanelTitle: "Need Help? Create a Support Ticket."
TicketPanel_Description: true
TicketPanel_Thumbnail: false
TicketPanel_Image: false
PanelMessage: "Click the button to open a new support ticket."
PanelThumbnail: "https://i.imgur.com/ieeZejl.png"
PanelImage: "https://i.imgur.com/5NkcmDq.png"
+40
View File
@@ -0,0 +1,40 @@
// SupportBot | Emerald Services
// Ready Event
const fs = require("fs");
const Discord = require("discord.js");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./Data/supportbot.yml', 'utf8'));
const cmdconfig = yaml.load(fs.readFileSync('./Data/commands.yml', 'utf8'));
const panelconfig = yaml.load(fs.readFileSync('./Data/ticket-panel.yml', 'utf8'));
const Event = require("../Structures/Event.js");
module.exports = new Event("messageReactionAdd", async (client) => {
let message = {
guild: reaction.message.channel.guild,
author: user,
content: "N/A",
channel: reaction.message.channel
}
if (panelconfig.TicketPanel) {
if (reaction.message.id === panelconfig.TicketPanelID) {
if (reaction.emoji.name == panelconfig.ButtonEmoji || reaction.emoji.id == panelconfig.ButtonEmoji) {
await reaction.users.remove(user.id)
try {
const cmd = client.commands.get(cmdconfig.OpenTicket);
if(!cmd) return;
cmd.run(message, message.content);
} catch (error) {
console.error(error);
}
}
}
}
});
-21
View File
@@ -1,21 +0,0 @@
MIT License
Copyright (c) 2021 Emerald Services
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Executable → Regular
-13
View File
@@ -1,13 +0,0 @@
![imgur](https://i.imgur.com/TQj40Mt.png)
## What is SupportBot?
SupportBot is an open-sourced support system for discord. It's completely free to use with high amounts of customisation to match your own brand.
## Quick Links
**|** [Discord](https://emeraldsrv.dev/discord) **|**
[Hosting](https://emeraldsrv.dev/hosting) **|**
[Documentation](https://docs.emeraldsrv.dev) **|**
[Download via Polymart](https://polymart.org/resource/supportbot-1-discord-ticket-bot.518) **|**
[Download via MC-Market](https://www.mc-market.org/resources/8940/) **|**
+24
View File
@@ -0,0 +1,24 @@
// SupportBot | Emerald Services
// Addon Structure
const fs = require("fs");
const Discord = require("discord.js");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./Data/supportbot.yml', 'utf8'));
function RunFunction(message, args, client) {}
class Addon {
constructor(options) {
this.name = options.name;
this.description = options.description;
this.permission = options.permission;
this.type = ["BOTH", "SLASH", "TEXT"].includes(options.type) ? options.type : "TEXT";
this.slashCommandOptions = options.slashCommandOptions || [];
this.run = options.run;
}
}
module.exports = Addon;
+103
View File
@@ -0,0 +1,103 @@
// SupportBot | Emerald Services
// Client Structure
const fs = require("fs");
const Discord = require("discord.js");
const Command = require("./Command.js");
const Event = require("./Event.js");
const intents = new Discord.Intents(32767);
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./Data/supportbot.yml', 'utf8'));
class Client extends Discord.Client {
constructor() {
super({ intents });
this.commands = new Discord.Collection();
this.prefix = supportbot.Prefix;
}
start(token) {
const commandFiles = fs.readdirSync("./Commands")
.filter(file => file.endsWith(".js"));
const commands = commandFiles.map(file => require(`../Commands/${file}`));
console.log(`\u001b[34;1m`, '▬▬▬▬▬▬▬ Commands ▬▬▬▬▬▬▬')
commands.forEach(cmd => {
console.log(`\u001b[31;1m`, `${cmd.name}`, `\u001b[32;1m`, 'Loaded');
this.commands.set(cmd.name, cmd);
});
console.log(`\u001b[34;1m`, '▬▬▬▬▬▬▬ Commands ▬▬▬▬▬▬▬')
// Addons
const addonFiles = fs.readdirSync("./Addons")
.filter(file => file.endsWith(".js"));
const addons = addonFiles.map(file => require(`../Addons/${file}`));
console.log(' ')
console.log(`\u001b[34;1m`, '▬▬▬▬▬▬▬ Addons ▬▬▬▬▬▬▬')
addons.forEach(addon => {
console.log(`\u001b[31;1m`, `${addon.name}`, `\u001b[32;1m`, 'Loaded');
this.commands.set(addon.name, addon);
});
console.log(`\u001b[34;1m`, '▬▬▬▬▬▬▬ Addons ▬▬▬▬▬▬▬')
console.log(' ')
// Slash Commands
const slashCommands = commands
.filter(cmd => ["BOTH", "SLASH"].includes(cmd.type))
.map(cmd => ({
name: cmd.name.toLowerCase(),
description: cmd.description,
permissions: [],
options: cmd.slashCommandOptions,
defaultPermission: true
}));
this.removeAllListeners();
this.on("ready", async () => {
const cmds = await this.application.commands.set(slashCommands);
console.log(' ')
console.log(`\u001b[34;1m`, '▬▬▬▬▬▬▬ Slash Command ▬▬▬▬▬▬▬'),
console.log(' ')
cmds.forEach(cmd =>
console.log(`Slash Command ${cmd.name} registered`),
)
})
console.log(' ')
console.log(`\u001b[34;1m`, '▬▬▬▬▬▬▬ Events ▬▬▬▬▬▬▬')
fs.readdirSync("./Events")
.filter(file => file.endsWith(".js"))
.forEach(file => {
const event = require(`../Events/${file}`);
console.log(`\u001b[31;1m`, `${event.event}`, `\u001b[32;1m`, 'Loaded');
this.on(event.event, event.run.bind(null, this));
});
console.log(`\u001b[34;1m`, '▬▬▬▬▬▬▬ Events ▬▬▬▬▬▬▬')
console.log(' ')
this.login(token);
}
}
module.exports = Client;
+24
View File
@@ -0,0 +1,24 @@
// SupportBot | Emerald Services
// Command Structure
const fs = require("fs");
const Discord = require("discord.js");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./Data/supportbot.yml', 'utf8'));
function RunFunction(message, args, client) {}
class Command {
constructor(options) {
this.name = options.name;
this.description = options.description;
this.permission = options.permission;
this.type = ["BOTH", "SLASH", "TEXT"].includes(options.type) ? options.type : "TEXT";
this.slashCommandOptions = options.slashCommandOptions || [];
this.run = options.run;
}
}
module.exports = Command;
+21
View File
@@ -0,0 +1,21 @@
// SupportBot | Emerald Services
// Event Structure
const fs = require("fs");
const Discord = require("discord.js");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./Data/supportbot.yml', 'utf8'));
function RunFunction(client, ...eventArgs) {}
class Event {
constructor(event, runFunction) {
this.event = event;
this.run = runFunction;
}
}
module.exports = Event;
+76
View File
@@ -0,0 +1,76 @@
// SupportBot | Emerald Services
// Ticket ID Structure
const fs = require("fs");
const Discord = require("discord.js");
const Command = require("./Command.js");
const Client = require("./Client.js");
const Event = require("./Event.js");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./Data/supportbot.yml', 'utf8'));
class TicketNumberID {
static pad(guildId) {
let n = this.get(guildId) + '';
let z = '0';
let width = 4;
setTimeout(() => {
this.set(guildId, this.get(guildId) + 1);
}, 50);
return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n;
}
static get(guildId) {
let ticketnumberID = JSON.parse(fs.readFileSync("./Data/TicketData.json", "utf8"));
if (!ticketnumberID[guildId]) {
ticketnumberID[guildId] = {
id: 0
}
fs.writeFileSync("./Data/TicketData.json", JSON.stringify(ticketnumberID, null, 4), err => {
if (err) console.log(err);
});
return 0;
} else {
return ticketnumberID[guildId].id;
}
}
static set(guildId, value) {
let ticketnumberID = JSON.parse(fs.readFileSync("./Data/TicketData.json", "utf8"));
ticketnumberID[guildId] = {
id: value
}
fs.writeFileSync("./Data/TicketData.json", JSON.stringify(ticketnumberID, null, 4), err => {
if (err) console.log(err);
});
return value;
}
static reset(guildId) {
let ticketnumberID = JSON.parse(fs.readFileSync("./Data/TicketData.json", "utf8"));
ticketnumberID[guildId] = {
id: 0
}
fs.writeFileSync("./Data/TicketData.json", JSON.stringify(ticketnumberID, null, 4), err => {
if (err) console.log(err);
});
return 0;
}
}
module.exports = TicketNumberID;
-20
View File
@@ -1,20 +0,0 @@
// SupportBot, Created by Emerald Services
// Help Command
const Discord = require("discord.js");
const fs = require("fs");
const yaml = require('js-yaml');
// location for the addons configuration, to keep it simple we generate a settings folder within the addons directory.
const example = yaml.load(fs.readFileSync('./addons/settings/exampleaddon.yml', 'utf8'));
module.exports = {
name: example.ExampleAddonCommand,
description: example.ExampleAddonDesc,
execute(message, args) {
if (supportbot.DeleteMessages == "true") message.delete();
message.channel.send(example.ExampleAddonMessage)
}
};
-9
View File
@@ -1,9 +0,0 @@
#
# SupportBot, Created by Emerald Services
# Example Addon
#
ExampleAddonCommand: "exampleaddon"
ExampleAddonDesc: "This is the default/example addon for SupportBot."
ExampleAddonMessage: "> :white_check_mark: This is the **default** addon for SupportBot. You can download addons from our website, https://emeraldservices.xyz/"
-71
View File
@@ -1,71 +0,0 @@
// SupportBot, Created by Emerald Services
// Announce
const Discord = require("discord.js");
const fs = require("fs");
const yaml = require('js-yaml');
const { execute } = require("./help");
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
module.exports = {
name: supportbot.AnnounceCommand,
description: supportbot.AnnounceDesc,
execute(message, args) {
if (supportbot.DeleteMessages) message.delete();
let locateChannel = message.guild.channels.cache.find(AnnouncementChannel => AnnouncementChannel.name === supportbot.AnnouncementChannel) || message.guild.channels.cache.find(AnnouncementChannel => AnnouncementChannel.id === supportbot.AnnouncementChannel)
const errornochannel = new Discord.MessageEmbed()
.setTitle("Invalid Channel")
.setDescription(`${supportbot.InvalidChannel}\n\nChannel Required: \`${supportbot.AnnouncementChannel}`)
.setColor(supportbot.ErrorColour);
if(!locateChannel) return message.channel.send({ embeds: [errornochannel] });
let Admins = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Admin) || message.guild.roles.cache.find(adminRole => adminRole.id === supportbot.Admin)
const NoPerms = new Discord.MessageEmbed()
.setTitle("Invalid Permissions!")
.setDescription(`${supportbot.IncorrectPerms}\n\nRole Required: \`${Admins.name}\``)
.setColor(supportbot.WarningColour)
if (!message.member.roles.cache.has(Admins.id))
return message.channel.send({ embeds: [NoPerms] });
const embed = new Discord.MessageEmbed()
.setDescription(`> **${supportbot.AnnouncementStarter}**`)
.setColor(supportbot.EmbedColour)
message.channel.send({ embeds: [embed] });
let announcement = []
message.channel.awaitMessages(response => response.content.length > 2, {
max: 1,
time: 500000,
errors: ['time'],
}).then((collected) => {
announcement.push(collected.map(r => r.content));
locateChannel.send('@everyone')
const AnnouncementEmbed = new Discord.MessageEmbed()
.setTitle(supportbot.AnnouncementTitle)
.setThumbnail(supportbot.AnnouncementIcon)
.setDescription(announcement)
.setColor(supportbot.EmbedColour)
.setFooter(supportbot.EmbedFooter, message.author.displayAvatarURL());
locateChannel.send({ embed: AnnouncementEmbed }).then(async function(msg) {
const AnnouncementComplete = new Discord.MessageEmbed()
.setColor(supportbot.SuccessColour)
.setDescription(`:white_check_mark: You have successfully created an announcement. <#${locateChannel.id}>`)
message.channel.send({ embeds: [AnnouncementComplete] })
})
});
}
};
-108
View File
@@ -1,108 +0,0 @@
// SupportBot, Created by Emerald Services
// Say Command
const Discord = require("discord.js");
const fs = require("fs");
const yaml = require('js-yaml');
const { execute } = require("./help");
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
module.exports = {
name: supportbot.BanUser,
description: supportbot.BanDesc,
execute(message, args, member) {
if (supportbot.DeleteMessages) message.delete();
let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Admin) || message.guild.roles.cache.find(adminRole => adminRole.id === supportbot.Admin)
const NoPerms = new Discord.MessageEmbed()
.setTitle("Invalid Permissions!")
.setDescription(`${supportbot.IncorrectPerms}\n\nRole Required: \`${SupportStaff.name}\``)
.setColor(supportbot.WarningColour)
if (!message.member.roles.cache.has(SupportStaff.id))
return message.channel.send({ embeds: [NoPerms] });
let locateChannel = message.guild.channels.cache.find(ModLogChannel => ModLogChannel.name === supportbot.ModLogChannel) || message.guild.channels.cache.find(ModLogChannel => ModLogChannel.id === supportbot.ModLogChannel)
const errornochannel = new Discord.MessageEmbed()
.setTitle("Invalid Channel")
.setDescription(`${supportbot.InvalidChannel}\n\nChannel Required: \`${supportbot.ModLogChannel}\``)
.setColor(supportbot.ErrorColour);
if(!locateChannel) return message.channel.send({ embeds: [errornochannel] });
const user = message.mentions.members.first() || message.guild.members.cache.get(args[0]);
const embed1 = new Discord.MessageEmbed()
.setDescription("> :x: Please provide a reason to ban.\n\n`Try Again!`")
.setColor(supportbot.ErrorColour)
if (!args[0]) return message.channel.send({
embeds: [embed1]
});
const embed2 = new Discord.MessageEmbed()
.setDescription("> :detective: **Hmm!** Can\'t seem tp find this user.\n\n`Are they in the server?`")
.setColor(supportbot.EmbedColour)
if (!user) return message.channel.send({
embeds: [embed2]
})
const embed3 = new Discord.MessageEmbed()
.setDescription("> :x: **Err No!** Cannot punish this user!\n\n`Reason: Their permissions and or roles are greater than mine.`")
.setColor(supportbot.EmbedColour)
if(!user.bannable) return message.channel.send({
embeds: [embed3]
});
const embed4 = new Discord.MessageEmbed()
.setDescription("> :joy: **OML!** Did you really just try to ban yourself!")
.setColor(supportbot.EmbedColour)
if(user.id === message.author.id) return message.channel.send({
embeds: [embed4]
});
let reason = args.slice(1).join(" ");
if(!reason) reason = 'No Reason Provided.';
const embed5 = new Discord.MessageEmbed()
.setDescription("> :thinking: **Hmm** Something seems to have gone wrong.\n\n`Check your system for errors!`")
.setColor(supportbot.EmbedColour)
user.ban({ days: supportbot.DaysBannedFor, reason: `${reason}` }).catch(err => {
message.channel.send({ embeds: [embed5] })
console.log(err)
})
const successEmbed = new Discord.MessageEmbed()
.setDescription(`> :white_check_mark: **OOF!** ${user} has been banned!`)
.setColor(supportbot.SuccessColour)
message.channel.send({
embed: successEmbed
})
const logEmbed = new Discord.MessageEmbed()
.setTitle(supportbot.BanTitle)
.setThumbnail(supportbot.ModThumbnail)
.addField('Banned User:', user)
.addField('Staff Member', message.author)
.addField('Reason:', reason)
.setFooter(supportbot.EmbedFooter)
.setColor(supportbot.BanLogColour)
.setTimestamp()
locateChannel.send({ embeds: [logEmbed] })
}
};
-100
View File
@@ -1,100 +0,0 @@
// SupportBot, Created by Emerald Services
// Blacklist Command
const Discord = require("discord.js");
const fs = require("fs");
const yaml = require('js-yaml');
const { execute } = require("./help");
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
module.exports = {
name: supportbot.BlacklistUser,
description: supportbot.BlacklistDesc,
execute(message, args) {
if (supportbot.DeleteMessages) message.delete();
let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Admin) || message.guild.roles.cache.find(adminRole => adminRole.id === supportbot.Admin)
const NoPerms = new Discord.MessageEmbed()
.setTitle("Invalid Permissions!")
.setDescription(`${supportbot.IncorrectPerms}\n\nRole Required: \`${SupportStaff.name}\``)
.setColor(supportbot.WarningColour)
if (!message.member.roles.cache.has(SupportStaff.id)) {
return message.channel.send({ embeds: [NoPerms] });
}
let locateChannel = message.guild.channels.cache.find(ModLogChannel => ModLogChannel.name === supportbot.ModLogChannel) || message.guild.channels.cache.find(ModLogChannel => ModLogChannel.id === supportbot.ModLogChannel)
const user = message.mentions.members.first() || message.guild.members.cache.get(args[0]);
const errornochannel = new Discord.MessageEmbed()
.setTitle("Invalid Channel")
.setDescription(`${supportbot.InvalidChannel}\n\nChannel Required: \`${supportbot.ModLogChannel}\``)
.setColor(supportbot.ErrorColour);
if(!locateChannel) return message.channel.send({ embeds: [errornochannel] });
const embed1 = new Discord.MessageEmbed()
.setDescription("> :x: Please mention or write an ID\n\n`Try Again!`")
.setColor(supportbot.ErrorColour)
if (!args[0]) return message.channel.send({
embeds: [embed1]
});
const embed2 = new Discord.MessageEmbed()
.setDescription("> :detective: **Hmm!** Can\'t seem tp find this user.\n\n`Are they in the server?`")
.setColor(supportbot.EmbedColour)
if (!user) return message.channel.send({
embeds: [embed2]
});
let role = message.guild.roles.cache.find(role => role.name === supportbot.TicketBlackListRole) || message.guild.roles.cache.find(role => role.id === supportbot.TicketBlackListRole)
const embed3 = new Discord.MessageEmbed()
.setDescription("> :detective: **Hmm!** Can\'t seem to find the blacklist role.\n\n`Did you created it?")
.setColor(supportbot.ErrorColour)
if (!role) return message.channel.send({
embeds: [embed3]
});
const embed4 = new Discord.MessageEmbed()
.setDescription(`${user} is already blacklisted`)
.setColor(supportbot.ErrorColour)
if(user.roles.cache.find(role => role.name === supportbot.TicketBlackListRole) || user.roles.cache.find(role => role.id === supportbot.TicketBlackListRole)) {
return message.channel.send({
embeds: [embed4]
})
};
user.roles.add(role);
const embed5 = new Discord.MessageEmbed()
.setDescription(`Blacklisted ${user} successfully from creating a ticket`)
.setColor(supportbot.EmbedColour)
message.channel.send({
embeds: [embed5]
});
const logEmbed = new Discord.MessageEmbed()
.setTitle(supportbot.BlacklistTitle)
.setThumbnail(supportbot.ModThumbnail)
.addField('Banned User:', user)
.addField('Staff Member', message.author)
.setFooter(supportbot.EmbedFooter)
.setColor(supportbot.BlacklistColour)
.setTimestamp()
locateChannel.send({ embeds: [logEmbed] });
}
};
-51
View File
@@ -1,51 +0,0 @@
// SupportBot, Created by Emerald Services
// Say Command
const Discord = require("discord.js");
const fs = require("fs");
const yaml = require('js-yaml');
const { execute } = require("./help");
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
module.exports = {
name: supportbot.BotSay,
description: supportbot.BotSayDesc,
execute(message, args) {
if (supportbot.DeleteMessages) message.delete();
let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Staff) || message.guild.roles.cache.find(adminRole => adminRole.id === supportbot.Staff)
const NoPerms = new Discord.MessageEmbed()
.setTitle("Invalid Permissions!")
.setDescription(`${supportbot.IncorrectPerms}\n\nRole Required: \`${SupportStaff.name}\``)
.setColor(supportbot.WarningColour)
if (!message.member.roles.cache.has(SupportStaff.id))
return message.channel.send({ embeds: [NoPerms] });
const embed = new Discord.MessageEmbed()
.setDescription(`> **What would you like me to say!**`)
.setColor(supportbot.EmbedColour)
message.channel.send({ embeds: [embed] });
let announcement = []
message.channel.awaitMessages(response => response.content.length > 2, {
max: 1,
time: 500000,
errors: ['time'],
}).then((collected) => {
announcement.push(collected.map(r => r.content));
const AnnouncementEmbed = new Discord.MessageEmbed()
.setDescription(announcement)
.setColor(supportbot.EmbedColour)
message.channel.send({ embeds: [AnnouncementEmbed] })
})
}
};
-85
View File
@@ -1,85 +0,0 @@
// SupportBot, Created by Emerald Services
// Help Command
const Discord = require("discord.js");
const fs = require("fs");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
module.exports = {
name: supportbot.HelpCommand,
description: supportbot.HelpDesc,
execute(message, args) {
if (supportbot.DeleteMessages) message.delete();
let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Staff) || message.guild.roles.cache.find(staffRole => staffRole.id === supportbot.Staff);
let AdminStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Admin) || message.guild.roles.cache.find(adminRole => adminRole.id === supportbot.Admin);
if (supportbot.HelpMenu) {
let generalCommands = "";
generalCommands += `**${supportbot.Prefix}${supportbot.HelpCommand}** ${supportbot.HelpDesc}\n`;
generalCommands += `**${supportbot.Prefix}${supportbot.LinksCommand}** ${supportbot.LinksDesc}\n`;
generalCommands += `**${supportbot.Prefix}${supportbot.SuggestCommand}** ${supportbot.SuggestionDesc}\n`;
generalCommands += `**${supportbot.Prefix}${supportbot.PingCommand}** ${supportbot.PingDesc}\n`;
let supportCommands = "";
supportCommands += `**${supportbot.Prefix}${supportbot.NewTicket} [reason]** ${supportbot.NewTicketDesc}\n`
supportCommands += `**${supportbot.Prefix}${supportbot.CloseTicket} [reason]** ${supportbot.CloseTicketDesc}\n`
let staffCommands = "";
staffCommands += `**${supportbot.Prefix}${supportbot.AddUser} <user#0000>** ${supportbot.AddUserDesc}\n`
staffCommands += `**${supportbot.Prefix}${supportbot.RemoveUser} <user#0000>** ${supportbot.RemoveUserDesc}\n`
staffCommands += `**${supportbot.Prefix}${supportbot.BotSay}** ${supportbot.BotSayDesc}\n`
staffCommands += `**${supportbot.Prefix}${supportbot.PurgeMessage}** ${supportbot.PurgeDesc}\n`
staffCommands += `**${supportbot.Prefix}${supportbot.ChatLog}** ${supportbot.ChatLogDesc}\n`
let adminCommands = "";
adminCommands += `**${supportbot.Prefix}${supportbot.AnnounceCommand}** ${supportbot.AnnounceDesc} \`Admin Only\`\n`
adminCommands += `**${supportbot.Prefix}${supportbot.BanUser}** ${supportbot.BanDesc} \`Admin Only\` \n`
adminCommands += `**${supportbot.Prefix}${supportbot.KickUser}** ${supportbot.KickDesc} \`Admin Only\` \n`
adminCommands += `**${supportbot.Prefix}${supportbot.BlacklistUser}** ${supportbot.BlacklistDesc} \`Admin Only\` \n`
const HelpEmbed1 = new Discord.MessageEmbed()
.setTitle(supportbot.Bot_Name)
.setThumbnail(message.author.displayAvatarURL())
.addFields(
{ name: '🖥️ General Commands\n', value: `${generalCommands}\n`, inline: false },
{ name: '🎫 Support Commands\n', value: `${supportCommands}\n`, inline: false },
)
.setColor(supportbot.EmbedColour)
.setFooter(supportbot.EmbedFooter, message.author.displayAvatarURL());
if (message.member.roles.cache.has(SupportStaff.id)) {
HelpEmbed1.addFields(
{ name: '🔐 Staff Commands\n', value: `${staffCommands}\n`, inline: false },
)
}
if (message.member.roles.cache.has(AdminStaff.id)) {
HelpEmbed1.addFields(
{ name: '🔐 Admin Commands\n', value: `${adminCommands}\n`, inline: false },
)
}
if (supportbot.SendHelpPage === "dm") {
message.author.send({
embeds: [HelpEmbed1]
});
}
if (supportbot.SendHelpPage === "channel") {
message.channel.send({
embeds: [HelpEmbed1]
});
}
}
}
};
-109
View File
@@ -1,109 +0,0 @@
// SupportBot, Created by Emerald Services
// Say Command
const Discord = require("discord.js");
const fs = require("fs");
const yaml = require('js-yaml');
const { execute } = require("./help");
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
module.exports = {
name: supportbot.KickUser,
description: supportbot.KickDesc,
execute(message, args, member) {
if (supportbot.DeleteMessages) message.delete();
let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Admin) || message.guild.roles.cache.find(adminRole => adminRole.id === supportbot.Admin)
const NoPerms = new Discord.MessageEmbed()
.setTitle("Invalid Permissions!")
.setDescription(`${supportbot.IncorrectPerms}\n\nRole Required: \`${SupportStaff.name}\``)
.setColor(supportbot.WarningColour)
if (!message.member.roles.cache.has(SupportStaff.id))
return message.channel.send({ embeds: [NoPerms] });
let locateChannel = message.guild.channels.cache.find(ModLogChannel => ModLogChannel.name === supportbot.ModLogChannel) || message.guild.channels.cache.find(ModLogChannel => ModLogChannel.id === supportbot.ModLogChannel)
const errornochannel = new Discord.MessageEmbed()
.setTitle("Invalid Channel")
.setDescription(`${supportbot.InvalidChannel}\n\nChannel Required: \`${supportbot.ModLogChannel}\``)
.setColor(supportbot.ErrorColour);
if(!locateChannel) return message.channel.send({ embeds: [errornochannel] });
const user = message.mentions.members.first() || message.guild.members.cache.get(args[0]);
const embed1 = new Discord.MessageEmbed()
.setDescription("> :x: Please provide a reason to kick.\n\n`Try Again!`")
.setColor(supportbot.ErrorColour)
if (!args[0]) return message.channel.send({
embeds: [embed1]
});
const embed2 = new Discord.MessageEmbed()
.setDescription("> :detective: **Hmm!** Can\'t seem tp find this user.\n\n`Are they in the server?`")
.setColor(supportbot.EmbedColour)
if (!user) return message.channel.send({
embeds: [embed2]
})
const embed3 = new Discord.MessageEmbed()
.setDescription("> :x: **Err No!** Cannot punish this user!\n\n`Reason: Their permissions and or roles are greater than mine.`")
.setColor(supportbot.EmbedColour)
if(!user.kickable) return message.channel.send({
embeds: [embed3]
});
const embed4 = new Discord.MessageEmbed()
.setDescription("> :joy: **OML!** Did you really just try to kick yourself!")
.setColor(supportbot.EmbedColour)
if(user.id === message.author.id) return message.channel.send({
embeds: [embed4]
});
let reason = args.slice(1).join(" ");
if(!reason) reason = 'No Reason Provided.';
const embed5 = new Discord.MessageEmbed()
.setDescription("> :thinking: **Hmm** Something seems to have gone wrong.\n\n`Check your system for errors!`")
.setColor(supportbot.EmbedColour)
user.kick({ reason: `${reason}` }).catch(err => {
message.channel.send({ embeds: [embed5] })
console.log(err)
})
const successEmbed = new Discord.MessageEmbed()
.setDescription(`> :white_check_mark: **OOF!** ${user} has been kicked!`)
.setColor(supportbot.SuccessColour)
message.channel.send({
embeds: [successEmbed]
})
const logEmbed = new Discord.MessageEmbed()
.setTitle(supportbot.KickTitle)
.setThumbnail(supportbot.ModThumbnail)
.addField('Kicked User:', user)
.addField('Staff Member', message.author)
.addField('Reason:', reason)
.setFooter(supportbot.EmbedFooter)
.setColor(supportbot.KickLogColour)
.setTimestamp()
locateChannel.send({ embeds: [logEmbed] })
}
};
-34
View File
@@ -1,34 +0,0 @@
// SupportBot, Created by Emerald Services
// Links Command
const Discord = require("discord.js");
const fs = require("fs");
const yaml = require('js-yaml');
const { execute } = require("./help");
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
module.exports = {
name: supportbot.LinksCommand,
description: supportbot.LinksDesc,
execute(message, args) {
if (supportbot.DeleteMessages) message.delete();
const LinksEmbed = new Discord.MessageEmbed()
.setColor(supportbot.EmbedColour)
let botLinks = supportbot.LINKS;
let links = '';
for ( let name in botLinks ) {
links += `[${name}](${botLinks[ name ]})\n`;
};
LinksEmbed.addField(supportbot.LinksTitle, links)
message.channel.send({ embeds: [LinksEmbed] });
}
};
Executable → Regular
+22 -17
View File
@@ -1,25 +1,30 @@
// SupportBot, Created by Emerald Services
// SupportBot | Emerald Services
// Ping Command
const Discord = require("discord.js");
const fs = require("fs");
const Discord = require("discord.js");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
const supportbot = yaml.load(fs.readFileSync('./Data/supportbot.yml', 'utf8'));
const cmdconfig = yaml.load(fs.readFileSync('./Data/commands.yml', 'utf8'));
module.exports = {
name: supportbot.PingCommand,
description: supportbot.PingDesc,
const Command = require("../Structures/Command.js");
execute(message, args) {
if (supportbot.DeleteMessages) message.delete();
let ping = Date.now() - message.createdTimestamp + " ms";
const PingCommandEmbed = new Discord.MessageEmbed()
.setDescription(`🏓 **Pong!** \`${Date.now() - message.createdTimestamp}ms\``)
.setColor(supportbot.EmbedColour)
module.exports = new Command({
name: cmdconfig.PingCommand,
description: cmdconfig.PingCommandDesc,
type: "BOTH",
slashCommandOptions: [],
permission: "SEND_MESSAGES",
message.channel.send({ embeds: [PingCommandEmbed] });
}
};
async run(message, args, client) {
const PingEmbed = new Discord.MessageEmbed()
.setDescription(`:ping_pong: **Ping:** \`${client.ws.ping} ms\``)
.setColor(supportbot.EmbedColour)
message.channel.send({
embeds: [PingEmbed]
});
}
});
-79
View File
@@ -1,79 +0,0 @@
// SupportBot, Created by Emerald Services
// Say Command
const Discord = require("discord.js");
const fs = require("fs");
const yaml = require('js-yaml');
const { execute } = require("./help");
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
module.exports = {
name: supportbot.PurgeMessage,
description: supportbot.PurgeDesc,
execute(message, args, member) {
if (supportbot.DeleteMessages) message.delete();
let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Staff) || message.guild.roles.cache.find(adminRole => adminRole.id === supportbot.Staff)
const NoPerms = new Discord.MessageEmbed()
.setTitle("Invalid Permissions!")
.setDescription(`${supportbot.IncorrectPerms}\n\nRole Required: \`${SupportStaff}\``)
.setColor(supportbot.WarningColour)
if (!message.member.roles.cache.has(supportbot.Staff))
return message.channel.send({ embeds: [NoPerms] });
let locateChannel = message.guild.channels.cache.find(ModLogChannel => ModLogChannel.name === supportbot.ModLogChannel) || message.guild.channels.cache.find(ModLogChannel => ModLogChannel.id === supportbot.ModLogChannel)
const errornochannel = new Discord.MessageEmbed()
.setTitle("Invalid Channel")
.setDescription(`${supportbot.InvalidChannel}\n\nChannel Required: \`${supportbot.ModLogChannel}\``)
.setColor(supportbot.ErrorColour);
if(!locateChannel) return message.channel.send({ embeds: [errornochannel] });
const embed1 = new Discord.MessageEmbed()
.setDescription(`> :thinking: **Hmm!** Please enter a valid number of message to purge!\n\n\`${supportbot.Prefix}${supportbot.PurgeMessage} <message count>\` `)
.setColor(supportbot.WarningColour)
if (!args[0]) return message.channel.send({
embeds: [embed1]
});
const messagePrune = parseInt(args[0])
const embed2 = new Discord.MessageEmbed()
.setDescription("> :person_facepalming: **Grr!** Can you count? That ain't a number :joy:")
.setColor(supportbot.ErrorColour)
if (isNaN(messagePrune)) return message.reply({
embeds: [embed2]
})
message.channel.bulkDelete(messagePrune).then(() => {
const embed3 = new Discord.MessageEmbed()
.setDescription(`> :recycle: \`${args[0]} messages\` **have been purged!** `)
.setColor(supportbot.ErrorColour)
message.channel.send({
embeds: [embed3]
})
})
const logEmbed = new Discord.MessageEmbed()
.setTitle(supportbot.PruneLogTitle)
.setThumbnail(supportbot.PruneThumbnail)
.addField('Messages Purged', `\`${args[0]} messages\``)
.addField('Staff Member', `${message.author}`)
.setFooter(supportbot.EmbedFooter)
.setColor(supportbot.PruneColour)
.setTimestamp()
locateChannel.send({ embeds: [logEmbed] })
}
};
-70
View File
@@ -1,70 +0,0 @@
// SupportBot, Created by Emerald Services
// Suggest Command
const Discord = require("discord.js");
const fs = require("fs");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
module.exports = {
name: supportbot.SuggestCommand,
description: supportbot.SuggestionDesc,
execute(message, args) {
if (supportbot.DeleteMessages) message.delete();
let locateChannel = message.guild.channels.cache.find(SuggestionChannel => SuggestionChannel.name === supportbot.SuggestionChannel) || message.guild.channels.cache.find(SuggestionChannel => SuggestionChannel.id === supportbot.SuggestionChannel)
const errornochannel = new Discord.MessageEmbed()
.setTitle("Invalid Channel")
.setDescription(`${supportbot.InvalidChannel}\n\nChannel Required: \`${supportbot.SuggestionChannel}\``)
.setColor(supportbot.ErrorColour);
if(!locateChannel) return message.channel.send({ embeds: [errornochannel] });
const embed = new Discord.MessageEmbed()
.setDescription(`> **${supportbot.SuggestionStarter}**`)
.setColor(supportbot.EmbedColour)
message.channel.send({ embeds: [embed] });
let suggestion = []
message.channel.awaitMessages(response => response.content.length > 2, {
max: 1,
time: 500000,
errors: ['time'],
}).then((collected) => {
suggestion.push(collected.map(r => r.content));
const SuggestionMessage = new Discord.MessageEmbed()
.setColor(supportbot.EmbedColour)
.setFooter(supportbot.EmbedFooter)
.addField(supportbot.SuggestionTitle, suggestion, true)
.addField("From", `<@${message.author.id}>`, true)
if (supportbot.SuggestionMessage_Icon === "BOT") {
SuggestionMessage.setThumbnail(bot.user.displayAvatarURL())
}
if (supportbot.SuggestionMessage_Icon === "USER") {
SuggestionMessage.setThumbnail(message.author.displayAvatarURL())
}
if (supportbot.SuggestionMessage_Icon === "CUSTOM") {
SuggestionMessage.setThumbnail(supportbot.SuggestionIcon_URL)
}
locateChannel.send({ embeds: [SuggestionMessage] }).then(async function(msg) {
msg.react(supportbot.SuggestReact_1).then(() => msg.react(supportbot.SuggestReact_2));
});
const SuggestionComplete = new Discord.MessageEmbed()
.setColor(supportbot.SuccessColour)
.setDescription(`:white_check_mark: Your suggestion has been successfully created. <#${locateChannel.id}>`)
message.channel.send({ embeds: [SuggestionComplete] })
});
}
};
+245 -242
View File
@@ -1,242 +1,245 @@
// SupportBot, Created by Emerald Services
// Ticket Command
const Discord = require("discord.js");
const { MessageButton, MessageActionRow, Permissions } = require("discord.js");
const fs = require("fs")
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
const TicketNumberID = require('../utils/TicketNumber.js');
async function asyncForEach(array, callback) {
for (let index = 0; index < array.length; index++) {
await callback(array[index], index, array);
}
}
module.exports = {
name: supportbot.NewTicket,
description: supportbot.NewTicketDesc,
async execute(message, args) {
if (message.channel.name !== supportbot.ReactionChannel) {
if (supportbot.DeleteMessages) message.delete();
}
let reactionUser = message.guild.members.cache.get(message.author.id)
if (reactionUser.roles.cache.find(role => role.name === supportbot.TicketBlackListRole) || reactionUser.roles.cache.find(role => role.id === supportbot.TicketBlackListRole)) {
return message.channel.send({content:`<@${message.author.id}> ${supportbot.TicketBlackListMessage}`}).then(msg => {
setTimeout(() => msg.delete(), 3500)
})
}
// Ticket ID
let ticketNumberID = TicketNumberID.pad(message.guild.id);
// Ticket Subject
const TicketSubject = args || supportbot.NoTicketSubject;
const TicketExists = new Discord.MessageEmbed()
.setTitle("Ticket Exists!")
.setDescription(`${supportbot.TicketExists}`)
.setColor(supportbot.WarningColour)
if (message.guild.channels.cache.find(ticketChannel => ticketChannel.name === `${supportbot.TicketChannel}-${ticketNumberID}`)) {
return message.channel.send({ embeds: [TicketExists] });
}
const Staff = message.guild.roles.cache.find(SupportTeam => SupportTeam.name === supportbot.Staff) || message.guild.roles.cache.find(SupportTeam => SupportTeam.id === supportbot.Staff)
const Admins = message.guild.roles.cache.find(AdminUser => AdminUser.name === supportbot.Admin) || message.guild.roles.cache.find(AdminUser => AdminUser.id === supportbot.Admin)
const DeptRole1 = message.guild.roles.cache.find(DepartmentRole => DepartmentRole.name === `${supportbot.DepartmentRole_1}`) || message.guild.roles.cache.find(DepartmentRole => DepartmentRole.id === `${supportbot.DepartmentRole_1}`)
const DeptRole2 = message.guild.roles.cache.find(DepartmentRole => DepartmentRole.name === `${supportbot.DepartmentRole_2}`) || message.guild.roles.cache.find(DepartmentRole => DepartmentRole.id === `${supportbot.DepartmentRole_2}`)
const DeptRole3 = message.guild.roles.cache.find(DepartmentRole => DepartmentRole.name === `${supportbot.DepartmentRole_3}`) || message.guild.roles.cache.find(DepartmentRole => DepartmentRole.id === `${supportbot.DepartmentRole_3}`)
const Author = message.author
const Everyone = message.guild.id
const ticketChannel = await message.guild.channels.create(`${supportbot.TicketChannel}-${ticketNumberID}`, {
type: "GUILD_TEXT",
})
if (message.channel.name === supportbot.ReactionChannel || message.channel.id === supportbot.ReactionChannel) {
const CreatedTicket = new Discord.MessageEmbed()
.setDescription(supportbot.TicketCreatedAlert.replace(/%ticketauthor%/g, message.author.id).replace(/%ticketid%/g, ticketChannel.id).replace(/%ticketusername%/g, message.author.username))
.setColor(supportbot.EmbedColour)
message.channel.send({embeds: [CreatedTicket]}).then(msg => {
setTimeout(() => msg.delete(), 5000)
})
} else {
const CreatedTicket = new Discord.MessageEmbed()
.setDescription(supportbot.TicketCreatedAlert.replace(/%ticketauthor%/g, message.author.id).replace(/%ticketid%/g, ticketChannel.id).replace(/%ticketusername%/g, message.author.username))
.setColor(supportbot.EmbedColour)
message.channel.send({embeds: [CreatedTicket]}).then(msg => setTimeout(() => msg.delete(), 5000));
}
let AllowArr = [Staff, Staff, Admins, Author]
await asyncForEach(AllowArr, (index) => {
ticketChannel.permissionOverwrites.create(index, {VIEW_CHANNEL: true})
})
let DenyArr = [Everyone]
await asyncForEach(DenyArr, (index) => {
ticketChannel.permissionOverwrites.create(index, {VIEW_CHANNEL: false})
})
let TicketCategory = message.guild.channels.cache.find(category => category.name === supportbot.TicketCategory) || message.guild.channels.cache.find(category => category.id === supportbot.TicketCategory)
if(TicketCategory) {
ticketChannel.setParent(TicketCategory.id)
}
if (supportbot.AllowTicketMentions) {
ticketChannel.send({content:`${message.author}`})
}
const TicketMessage = new Discord.MessageEmbed()
.setTitle(supportbot.Ticket_Title.replace(/%ticketauthor%/g, message.author.id).replace(/%ticketid%/g, ticketChannel.id).replace(/%ticketusername%/g, message.author.username))
.setDescription(supportbot.TicketMessage.replace(/%ticketauthor%/g, message.author.id).replace(/%ticketid%/g, ticketChannel.id).replace(/%ticketusername%/g, message.author.username))
.setColor(supportbot.EmbedColour)
if (supportbot.TicketSubject === "embed") {
if (TicketSubject != 'No Reason Provided.') {
TicketMessage.addFields({ name: 'Reason', value: TicketSubject })
}
}
if (supportbot.TicketSubject === "description") {
if (TicketSubject != 'No Reason Provided.') {
ticketChannel.setTopic(`Reason: ${TicketSubject} - User ID: ${message.author.id} - Ticket: ${ticketChannel.name}`)
}
}
if (supportbot.TicketDepartments) {
TicketMessage.addFields({ name: 'Departments', value: ` **${supportbot.DepartmentTitle_1}**\n **${supportbot.DepartmentTitle_2}**\n **${supportbot.DepartmentTitle_3}**` })
}
const CloseButton = new MessageButton()
.setCustomId('ticketclose')
.setLabel('Close')
.setStyle(supportbot.TicketCloseColour)
.setEmoji(supportbot.TicketCloseEmoji)
const LockButton = new MessageButton()
.setCustomId('ticketlock')
.setLabel('Lock')
.setStyle(supportbot.TicketLockColour)
.setEmoji(supportbot.TicketLockEmoji)
const row2 = new MessageActionRow()
.addComponents(CloseButton, LockButton)
if(supportbot.TicketDepartments) {
let DenyArr = [DeptRole1, DeptRole2, DeptRole3]
await asyncForEach(DenyArr, (index) => {
ticketChannel.permissionOverwrites.create(index, {VIEW_CHANNEL: false})
})
const Department1Button = new MessageButton()
.setCustomId('Department1')
.setLabel(`${supportbot.DepartmentTitle_1}`)
.setStyle(supportbot.TicketDept1Colour)
.setEmoji(supportbot.TicketDept1Emoji)
const Department2Button = new MessageButton()
.setCustomId('Department2')
.setLabel(`${supportbot.DepartmentTitle_2}`)
.setStyle(supportbot.TicketDept2Colour)
.setEmoji(supportbot.TicketDept2Emoji)
const Department3Button = new MessageButton()
.setCustomId('Department3')
.setLabel(`${supportbot.DepartmentTitle_3}`)
.setStyle(supportbot.TicketDept3Colour)
.setEmoji(supportbot.TicketDept3Emoji)
const row = new MessageActionRow()
.addComponents(Department1Button, Department2Button, Department3Button)
const m = await ticketChannel.send({embeds: [TicketMessage], components: [row]})
const filter = i => {
i.deferUpdate();
return i.user.id === message.author.id;
};
const collector = m.createMessageComponentCollector({ filter, max: 1, componentType: 'BUTTON', time: 60000 });
collector.on('collect',async (i) => {
if(i.customId === 'Department1') {
ticketChannel.permissionOverwrites.edit(DeptRole1, {
VIEW_CHANNEL: true,
READ_MESSAGE_HISTORY: true,
SEND_MESSAGES: true,
})
if(!supportbot.AllowStaff) {
ticketChannel.permissionOverwrites.edit(Staff, { VIEW_CHANNEL: false, READ_MESSAGE_HISTORY: false, SEND_MESSAGES: false })
}
const Department1 = new Discord.MessageEmbed()
.setDescription(`> Thank for reaching out to the **${supportbot.DepartmentTitle_1} Department**. Please provide us information regarding your query.`)
.setColor(supportbot.EmbedColour)
ticketChannel.send({ embeds: [Department1] });
if (supportbot.AllowTicketMentions) {
ticketChannel.send({content: `@here`})
}
}
i.message.edit({embeds: [TicketMessage], components: [row2]})
if(i.customId === 'Department2') {
ticketChannel.permissionOverwrites.edit(DeptRole2, {
VIEW_CHANNEL: true,
READ_MESSAGE_HISTORY: true,
SEND_MESSAGES: true,
})
if(!supportbot.AllowStaff) {
ticketChannel.permissionOverwrites.edit(Staff, { VIEW_CHANNEL: false, READ_MESSAGE_HISTORY: false, SEND_MESSAGES: false })
}
const Department2 = new Discord.MessageEmbed()
.setDescription(`> Thank for reaching out to the **${supportbot.DepartmentTitle_2} Department**. Please provide us information regarding your query.`)
.setColor(supportbot.EmbedColour)
ticketChannel.send({ embeds: [Department2] });
if (supportbot.AllowTicketMentions) {
ticketChannel.send({content: `@here`})
}
i.message.edit({embeds: [TicketMessage], components: [row2]})
}
if(i.customId === 'Department3') {
ticketChannel.permissionOverwrites.edit(DeptRole3, {
VIEW_CHANNEL: true,
READ_MESSAGE_HISTORY: true,
SEND_MESSAGES: true,
})
if(!supportbot.AllowStaff) {
ticketChannel.permissionOverwrites.edit(Staff, { VIEW_CHANNEL: false, READ_MESSAGE_HISTORY: false, SEND_MESSAGES: false })
}
const Department3 = new Discord.MessageEmbed()
.setDescription(`> Thank for reaching out to the **${supportbot.DepartmentTitle_3} Department**. Please provide us information regarding your query.`)
.setColor(supportbot.EmbedColour)
ticketChannel.send({ embeds: [Department3] });
if (supportbot.AllowTicketMentions) {
ticketChannel.send({content: `@here`})
}
i.message.edit({embeds: [TicketMessage], components: [row2]})
}
})
} else {
ticketChannel.send({embeds: [TicketMessage], components: [row2]})
}
}
}
// SupportBot | Emerald Services
// Ticket Command
const fs = require("fs");
const Discord = require("discord.js");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./Data/supportbot.yml', 'utf8'));
const cmdconfig = yaml.load(fs.readFileSync('./Data/commands.yml', 'utf8'));
const Command = require("../Structures/Command.js");
const TicketNumberID = require('../Structures/TicketID.js');
async function asyncForEach(array, callback) {
for (let index = 0; index < array.length; index++) {
await callback(array[index], index, array);
}
}
module.exports = new Command({
name: cmdconfig.OpenTicket,
description: cmdconfig.OpenTicketDesc,
type: "BOTH",
slashCommandOptions: [],
permission: "SEND_MESSAGES",
async run(message, args, client) {
let reactionUser = message.guild.members.cache.get(message.author.id)
if (reactionUser.roles.cache.find(role => role.name === supportbot.TicketBlackListRole) || reactionUser.roles.cache.find(role => role.id === supportbot.TicketBlackListRole)) {
return message.channel.send({content:`<@${message.author.id}> ${supportbot.TicketBlackListMessage}`}).then(msg => {
setTimeout(() => msg.delete(), 3500)
})
}
// Ticket ID
let ticketNumberID = TicketNumberID.pad(message.guild.id);
// Ticket Subject
const TicketSubject = args || supportbot.NoTicketSubject;
const TicketExists = new Discord.MessageEmbed()
.setTitle("Ticket Exists!")
.setDescription(`${supportbot.TicketExists}`)
.setColor(supportbot.WarningColour)
if (message.guild.channels.cache.find(ticketChannel => ticketChannel.name === `${supportbot.TicketChannel}-${ticketNumberID}`)) {
return message.channel.send({ embeds: [TicketExists] });
}
const Staff = message.guild.roles.cache.find(SupportTeam => SupportTeam.name === supportbot.Staff) || message.guild.roles.cache.find(SupportTeam => SupportTeam.id === supportbot.Staff)
const Admins = message.guild.roles.cache.find(AdminUser => AdminUser.name === supportbot.Admin) || message.guild.roles.cache.find(AdminUser => AdminUser.id === supportbot.Admin)
const DeptRole1 = message.guild.roles.cache.find(DepartmentRole => DepartmentRole.name === `${supportbot.DepartmentRole_1}`) || message.guild.roles.cache.find(DepartmentRole => DepartmentRole.id === `${supportbot.DepartmentRole_1}`)
const DeptRole2 = message.guild.roles.cache.find(DepartmentRole => DepartmentRole.name === `${supportbot.DepartmentRole_2}`) || message.guild.roles.cache.find(DepartmentRole => DepartmentRole.id === `${supportbot.DepartmentRole_2}`)
const DeptRole3 = message.guild.roles.cache.find(DepartmentRole => DepartmentRole.name === `${supportbot.DepartmentRole_3}`) || message.guild.roles.cache.find(DepartmentRole => DepartmentRole.id === `${supportbot.DepartmentRole_3}`)
const Author = message.author
const Everyone = message.guild.id
const ticketChannel = await message.guild.channels.create(`${supportbot.TicketChannel}-${ticketNumberID}`, {
type: "GUILD_TEXT",
})
if (message.channel.name === supportbot.ReactionChannel || message.channel.id === supportbot.ReactionChannel) {
const CreatedTicket = new Discord.MessageEmbed()
.setDescription(supportbot.TicketCreatedAlert.replace(/%ticketauthor%/g, message.author.id).replace(/%ticketid%/g, ticketChannel.id).replace(/%ticketusername%/g, message.author.username))
.setColor(supportbot.EmbedColour)
message.channel.send({embeds: [CreatedTicket]}).then(msg => {
setTimeout(() => msg.delete(), 5000)
})
} else {
const CreatedTicket = new Discord.MessageEmbed()
.setDescription(supportbot.TicketCreatedAlert.replace(/%ticketauthor%/g, message.author.id).replace(/%ticketid%/g, ticketChannel.id).replace(/%ticketusername%/g, message.author.username))
.setColor(supportbot.EmbedColour)
message.channel.send({embeds: [CreatedTicket]}).then(msg => setTimeout(() => msg.delete(), 5000));
}
let AllowArr = [Staff, Staff, Admins, Author]
await asyncForEach(AllowArr, (index) => {
ticketChannel.permissionOverwrites.create(index, {VIEW_CHANNEL: true})
})
let DenyArr = [Everyone]
await asyncForEach(DenyArr, (index) => {
ticketChannel.permissionOverwrites.create(index, {VIEW_CHANNEL: false})
})
let TicketCategory = message.guild.channels.cache.find(category => category.name === supportbot.TicketCategory) || message.guild.channels.cache.find(category => category.id === supportbot.TicketCategory)
if(TicketCategory) {
ticketChannel.setParent(TicketCategory.id)
}
if (supportbot.AllowTicketMentions) {
ticketChannel.send({content:`${message.author}`})
}
const TicketMessage = new Discord.MessageEmbed()
.setTitle(supportbot.Ticket_Title.replace(/%ticketauthor%/g, message.author.id).replace(/%ticketid%/g, ticketChannel.id).replace(/%ticketusername%/g, message.author.username))
.setDescription(supportbot.TicketMessage.replace(/%ticketauthor%/g, message.author.id).replace(/%ticketid%/g, ticketChannel.id).replace(/%ticketusername%/g, message.author.username))
.setColor(supportbot.EmbedColour)
if (supportbot.TicketSubject === "embed") {
if (TicketSubject != 'No Reason Provided.') {
TicketMessage.addFields({ name: 'Reason', value: TicketSubject })
}
}
if (supportbot.TicketSubject === "description") {
if (TicketSubject != 'No Reason Provided.') {
ticketChannel.setTopic(`Reason: ${TicketSubject} - User ID: ${message.author.id} - Ticket: ${ticketChannel.name}`)
}
}
if (supportbot.TicketDepartments) {
TicketMessage.addFields({ name: 'Departments', value: ` **${supportbot.DepartmentTitle_1}**\n **${supportbot.DepartmentTitle_2}**\n **${supportbot.DepartmentTitle_3}**` })
}
const CloseButton = new Discord.MessageButton()
.setCustomId('ticketclose')
.setLabel('Close')
.setStyle(supportbot.TicketCloseColour)
.setEmoji(supportbot.TicketCloseEmoji)
const LockButton = new Discord.MessageButton()
.setCustomId('ticketlock')
.setLabel('Lock')
.setStyle(supportbot.TicketLockColour)
.setEmoji(supportbot.TicketLockEmoji)
const row2 = new Discord.MessageActionRow()
.addComponents(CloseButton, LockButton)
if(supportbot.TicketDepartments) {
let DenyArr = [DeptRole1, DeptRole2, DeptRole3]
await asyncForEach(DenyArr, (index) => {
ticketChannel.permissionOverwrites.create(index, {VIEW_CHANNEL: false})
})
const Department1Button = new Discord.MessageButton()
.setCustomId('Department1')
.setLabel(`${supportbot.DepartmentTitle_1}`)
.setStyle(supportbot.TicketDept1Colour)
.setEmoji(supportbot.TicketDept1Emoji)
const Department2Button = new Discord.MessageButton()
.setCustomId('Department2')
.setLabel(`${supportbot.DepartmentTitle_2}`)
.setStyle(supportbot.TicketDept2Colour)
.setEmoji(supportbot.TicketDept2Emoji)
const Department3Button = new Discord.MessageButton()
.setCustomId('Department3')
.setLabel(`${supportbot.DepartmentTitle_3}`)
.setStyle(supportbot.TicketDept3Colour)
.setEmoji(supportbot.TicketDept3Emoji)
const row = new Discord.MessageActionRow()
.addComponents(Department1Button, Department2Button, Department3Button)
const m = await ticketChannel.send({embeds: [TicketMessage], components: [row]})
const filter = i => {
i.deferUpdate();
return i.user.id === message.author.id;
};
const collector = m.createMessageComponentCollector({ filter, max: 1, componentType: 'BUTTON', time: 60000 });
collector.on('collect',async (i) => {
if(i.customId === 'Department1') {
ticketChannel.permissionOverwrites.edit(DeptRole1, {
VIEW_CHANNEL: true,
READ_MESSAGE_HISTORY: true,
SEND_MESSAGES: true,
})
if(!supportbot.AllowStaff) {
ticketChannel.permissionOverwrites.edit(Staff, { VIEW_CHANNEL: false, READ_MESSAGE_HISTORY: false, SEND_MESSAGES: false })
}
const Department1 = new Discord.MessageEmbed()
.setDescription(`> Thank for reaching out to the **${supportbot.DepartmentTitle_1} Department**. Please provide us information regarding your query.`)
.setColor(supportbot.EmbedColour)
ticketChannel.send({ embeds: [Department1] });
if (supportbot.AllowTicketMentions) {
ticketChannel.send({content: `@here`})
}
}
i.message.edit({embeds: [TicketMessage], components: [row2]})
if(i.customId === 'Department2') {
ticketChannel.permissionOverwrites.edit(DeptRole2, {
VIEW_CHANNEL: true,
READ_MESSAGE_HISTORY: true,
SEND_MESSAGES: true,
})
if(!supportbot.AllowStaff) {
ticketChannel.permissionOverwrites.edit(Staff, { VIEW_CHANNEL: false, READ_MESSAGE_HISTORY: false, SEND_MESSAGES: false })
}
const Department2 = new Discord.MessageEmbed()
.setDescription(`> Thank for reaching out to the **${supportbot.DepartmentTitle_2} Department**. Please provide us information regarding your query.`)
.setColor(supportbot.EmbedColour)
ticketChannel.send({ embeds: [Department2] });
if (supportbot.AllowTicketMentions) {
ticketChannel.send({content: `@here`})
}
i.message.edit({embeds: [TicketMessage], components: [row2]})
}
if(i.customId === 'Department3') {
ticketChannel.permissionOverwrites.edit(DeptRole3, {
VIEW_CHANNEL: true,
READ_MESSAGE_HISTORY: true,
SEND_MESSAGES: true,
})
if(!supportbot.AllowStaff) {
ticketChannel.permissionOverwrites.edit(Staff, { VIEW_CHANNEL: false, READ_MESSAGE_HISTORY: false, SEND_MESSAGES: false })
}
const Department3 = new Discord.MessageEmbed()
.setDescription(`> Thank for reaching out to the **${supportbot.DepartmentTitle_3} Department**. Please provide us information regarding your query.`)
.setColor(supportbot.EmbedColour)
ticketChannel.send({ embeds: [Department3] });
if (supportbot.AllowTicketMentions) {
ticketChannel.send({content: `@here`})
}
i.message.edit({embeds: [TicketMessage], components: [row2]})
}
})
} else {
ticketChannel.send({embeds: [TicketMessage], components: [row2]})
}
}
});
-60
View File
@@ -1,60 +0,0 @@
// SupportBot, Created by Emerald Services
// Announce
const Discord = require("discord.js");
const fs = require("fs");
const yaml = require('js-yaml');
const { execute } = require("./help");
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
module.exports = {
name: supportbot.ChatLog,
description: supportbot.ChatLogDesc,
execute(message, args) {
if (supportbot.DeleteMessages) message.delete();
let name = message.channel.name;
message.channel.messages.fetch({ limit: 100 }).then( msgs => {
let html = '';
msgs = msgs.sort( ( a, b ) => a.createdTimestamp - b.createdTimestamp );
html += `<strong>--- Channel Transcript ---</strong><br>`;
html += `<strong>Server Name:</strong> ${message.guild.name}<br>`;
html += `<strong>Channel:</strong> ${name}<br>`;
html += `<strong>Message:</strong> ${msgs.size} Messages<br><br><br>`;
msgs.forEach( msg => {
if ( msg.content ) {
html += `<strong>User:</strong> ${msg.author.tag}<br>`;
html += `<strong>Message:</strong> ${msg.content}<br>`;
html += `-----<br><br>`;
}
});
const TranscriptSavedEmbed = new Discord.MessageEmbed()
.setDescription(supportbot.ChatLogSavedMessage)
.setColor(supportbot.SuccessColour)
message.channel.send({embeds: [TranscriptSavedEmbed]})
const errornochannel = new Discord.MessageEmbed()
.setTitle("SupportBot Error!")
.setDescription(`:x: **Error!** Channel not Found, This command cannot be executed proberbly as their is no channel within this server.\nThis is configurable via **supportbot-config.yml**\n\nChannel Required: \`${supportbot.ChatLogChannel}\`\n\nError Code: \`SB-03\``)
.setColor(supportbot.ErrorColour);
const ChatLogs = new Discord.MessageEmbed()
.setTitle(supportbot.ChatLog_Title)
.setThumbnail(supportbot.ChatLog_Thumbnail)
.addFields(
{ name: 'Channel', value: `<#${message.channel.id}>` },
{ name: 'User', value: `<@${message.author.id}>` },
)
.setColor(supportbot.EmbedColour)
.setFooter(supportbot.EmbedFooter)
let locateChannel = message.guild.channels.cache.find(LocateChannel => LocateChannel.name === supportbot.ChatLogChannel) || message.guild.channels.cache.find(LocateChannel => LocateChannel.id === supportbot.ChatLogChannel)
if(!locateChannel) return message.channel.send({ embeds: [errornochannel] });
let file = new Discord.MessageAttachment( Buffer.from( html ), `${name}.html` )
locateChannel.send({embeds: [ChatLogs], files: [file]})
})
}
}
-58
View File
@@ -1,58 +0,0 @@
// SupportBot 6.0, Created by Emerald Services
// Ready Event
const Discord = require("discord.js");
const fs = require("fs");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
module.exports = async (bot, member) => {
if (supportbot.SystemMessages) {
const SystemChannel = member.guild.channels.cache.find(channel => channel.name === supportbot.UserJoined_Channel) || member.guild.channels.cache.get(supportbot.UserJoined_Channel)
if (!SystemChannel) return;
console.log(`[${supportbot.Bot_Name}]: ${member.user.username} has joined ${member.guild.name}!`)
console.log(supportbot.AutoRole_Role)
const role = member.guild.roles.cache.find(role => role.name === supportbot.AutoRole_Role) || member.guild.roles.cache.find(role => role.id === supportbot.AutoRole_Role)
member.roles.add(role).catch(console.error);
if (supportbot.SystemMessage_Type === "embed") {
const GuildAddMember = new Discord.MessageEmbed()
.setTitle(supportbot.Welcome_Title)
.setDescription(supportbot.WelcomeMessage.replace(/%member%/g, `<@!${member.user.id}>`).replace(/%guildname%/g, member.guild.name))
.setColor(supportbot.EmbedColour)
if (supportbot.SystemMessage_Icon === "BOT") {
GuildAddMember.setThumbnail(bot.user.displayAvatarURL())
}
if (supportbot.SystemMessage_Icon === "USER") {
GuildAddMember.setThumbnail(member.user.displayAvatarURL())
}
if (supportbot.SystemMessage_Icon === "CUSTOM") {
SuggestionMessage.setThumbnail(supportbot.SystemMessageIcon_URL)
}
if (supportbot.SystemMessage_EmbedFooter) {
GuildAddMember.setFooter(supportbot.EmbedFooter)
}
SystemChannel.send({ embeds: [GuildAddMember] });
}
if (supportbot.SystemMessage_Type === "normal") {
SystemChannel.send({content: supportbot.WelcomeMessage.replace(/%member%/g, member.user.username).replace(/%guildname%/g, member.guild.name)})
}
}
};
-51
View File
@@ -1,51 +0,0 @@
// SupportBot 6.0, Created by Emerald Services
// Ready Event
const Discord = require("discord.js");
const fs = require("fs");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
module.exports = async (bot, member) => {
if (supportbot.SystemMessages) {
const SystemChannel = member.guild.channels.cache.find(channel => channel.name === supportbot.UserDeparted_Channel) || member.guild.channels.cache.get(supportbot.UserDeparted_Channel)
if (!SystemChannel) return;
console.log(`\u001b[31m.`, `[${supportbot.Bot_Name}]: ${member.user.username} has left ${member.guild.name}!`)
if (supportbot.UserDeparted_Type === "embed") {
const GuildRemoveMember = new Discord.MessageEmbed()
.setTitle(supportbot.Departed_Title)
.setDescription(supportbot.DepartedMessage.replace(/%member%/g, member.user.username).replace(/%guildname%/g, member.guild.name))
.setColor(supportbot.EmbedColour)
if (supportbot.SystemMessage_Icon === "BOT") {
GuildRemoveMember.setThumbnail(bot.user.displayAvatarURL())
}
if (supportbot.SystemMessage_Icon === "USER") {
GuildRemoveMember.setThumbnail(member.user.displayAvatarURL())
}
if (supportbot.SystemMessage_Icon === "CUSTOM") {
SuggestionMessage.setThumbnail(supportbot.SystemMessageIcon_URL)
}
if (supportbot.SystemMessage_EmbedFooter) {
GuildRemoveMember.setFooter(supportbot.EmbedFooter)
}
SystemChannel.send({ embeds: [GuildRemoveMember] });
}
if (supportbot.SystemMessage_Type === "normal") {
SystemChannel.send({content: supportbot.DepartedMessage.replace(/%member%/g, member.user.username).replace(/%guildname%/g, member.guild.name)})
}
}
};
+166 -128
View File
@@ -1,128 +1,166 @@
// SupportBot Interaction Event
// SupportBot Created by Emerald Services
const fs = require("fs");
const { MessageEmbed, MessageAttachment, Permissions, MessageButton, MessageActionRow } = require("discord.js");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
module.exports = async (bot, interaction, args) => {
if (interaction.isCommand()) return;
if(interaction.isButton()) {
if(interaction.customId === 'openticket') {
interaction.message.fetch()
interaction.deferUpdate()
let message = {
guild: bot.guilds.cache.get(interaction.message.guildId),
author: bot.users.cache.get(interaction.user.id),
content: "N/A",
channel: bot.channels.cache.get(interaction.message.channelId)
}
try {
const cmd = bot.commands.get(supportbot.NewTicket);
if(!cmd) return;
cmd.execute(message, message.content)
}
catch (error){
console.error(error)
}
}
if(interaction.customId === 'ticketclose') {
if(interaction.channel.name.startsWith(`${supportbot.TicketChannel}-`)) {
interaction.message.fetch()
interaction.deferUpdate()
const DeleteTicketEmbed = new MessageEmbed()
.setDescription(supportbot.TicketDeleteMessage)
.setColor(supportbot.EmbedColour)
interaction.channel.send({embeds: [DeleteTicketEmbed]})
let logChannel = interaction.guild.channels.cache.find(channel => channel.name === supportbot.TranscriptLog) || interaction.guild.channels.cache.find(channel => channel.id === supportbot.TranscriptLog)
let user = interaction.user
let name = interaction.channel.name;
let ticketChannel = interaction.channel
let reason = "No Reason Provided."
interaction.channel.send({content: `**${supportbot.ClosingTicket}**`})
.then(() => {
const logEmbed = new MessageEmbed()
.setTitle(supportbot.TranscriptTitle)
.setColor(supportbot.EmbedColour)
.setFooter(supportbot.EmbedFooter)
.addField("Closed By", user.username)
.addField("Reason", reason)
interaction.channel.messages.fetch({limit: 100}).then(msgs => {
let html = ''
msgs = msgs.sort( ( a, b ) => a.createdTimestamp - b.createdTimestamp );
html += `<strong>Server Name:</strong> ${interaction.guild.name}<br>`
html += `<strong>Ticket:</strong> ${ticketChannel.name}<br>`
html += `<strong>Message:</strong> ${msgs.size} Messages<br><br><br>`
msgs.forEach(msg => {
if(msg.content) {
html += `<strong>User:</strong> ${msg.author.tag}<br>`;
html += `<strong>Message:</strong> ${msg.content}<br>`;
html += `-----<br><br>`;
}
})
const TranscriptSavedEmbed = new MessageEmbed()
.setDescription(supportbot.TranscriptSavedMessage)
.setColor(supportbot.SuccessColour)
interaction.channel.send({embeds: [TranscriptSavedEmbed]})
let file = new MessageAttachment( Buffer.from( html ), `${name}.html` )
logChannel.send({embeds: [logEmbed], files: [file]})
setTimeout(() => interaction.channel.delete(), supportbot.TicketDeleteTime)
})
})
}
}
if(interaction.customId === 'ticketlock') {
if(interaction.channel.name.startsWith(`${supportbot.TicketChannel}`)) {
interaction.message.fetch()
interaction.deferUpdate()
let Admin = interaction.guild.roles.cache.find(AdminUser => AdminUser.name === supportbot.Admin) || interaction.guild.roles.cache.find(AdminUser => AdminUser.id === supportbot.Admin)
let all = interaction.channel.permissionOverwrites.cache
let parent = interaction.guild.channels.cache.find(c => c.name === `${supportbot.LockTicketCategory}`) || interaction.guild.channels.cache.find(c => c.id === `${supportbot.LockTicketCategory}`)
if(parent) {
interaction.channel.setParent(parent.id)
}
all.forEach(perm => {
interaction.channel.permissionOverwrites.delete(perm.id)
})
interaction.channel.permissionOverwrites.create(Admin.id, {VIEW_CHANNEL: true})
interaction.channel.permissionOverwrites.create(interaction.guild.id, {VIEW_CHANNEL: false})
const ticketDeleteButton = new MessageButton()
.setCustomId('ticketclose')
.setLabel('Close')
.setStyle(supportbot.TicketDeleteColour)
.setEmoji(supportbot.TicketDeleteEmoji)
const row = new MessageActionRow()
.addComponents(ticketDeleteButton)
const ArchiveEmbed = new MessageEmbed()
.setTitle("Archived")
.setDescription(`Archived ${interaction.channel.name}`)
.setColor(`${supportbot.SuccessColour}`)
interaction.channel.send({embeds: [ArchiveEmbed]})
interaction.message.edit({components: [row]})
}
}
}
}
// SupportBot | Emerald Services
// Interaction Create Event
const fs = require("fs");
const Discord = require("discord.js");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./Data/supportbot.yml', 'utf8'));
const cmdconfig = yaml.load(fs.readFileSync('./Data/commands.yml', 'utf8'));
const Event = require("../Structures/Event.js");
module.exports = new Event("interactionCreate", (client, interaction) => {
if (interaction.isCommand()) return;
const command = client.commands.find(cmd => cmd.name.toLowerCase() == interaction.commandName);
if (interaction.user.bot || !interaction.isCommand() || !interaction.guild)
return;
const args = [
interaction.commandName,
...client.commands
.find(cmd => cmd.name.toLowerCase() == interaction.commandName)
.slashCommandOptions.map(v => `${interaction.options.get(v.name).value}`)
];
const NotValid = new Discord.MessageEmbed()
.setDescription(`:x: \`Invalid Command\` `)
.setColor(supportbot.ErrorColour)
if (!command) return interaction.reply({
embeds: [NotValid]
});
const permission = interaction.member.permissions.has(command.permission);
const ValidPerms = new Discord.MessageEmbed()
.setDescription(":x: \`Invalid Permissions\` Do you have the correct permissions to execute this command?")
.setColor(supportbot.ErrorColour)
if (!permission)
return interaction.reply({
embeds: [ValidPerms]
});
command.run(interaction, args, client);
if(interaction.isButton()) {
if(interaction.customId === 'openticket') {
interaction.message.fetch()
interaction.deferUpdate()
let message = {
guild: client.guilds.cache.get(interaction.message.guildId),
author: client.users.cache.get(interaction.user.id),
content: "N/A",
channel: client.channels.cache.get(interaction.message.channelId)
}
try {
const cmd = client.commands.get(cmdconfig.OpenTicket);
if(!cmd) return;
cmd.run(message, message.content)
}
catch (error){
console.error(error)
}
}
if(interaction.customId === 'ticketclose') {
if(interaction.channel.name.startsWith(`${supportbot.TicketChannel}-`)) {
interaction.message.fetch()
interaction.deferUpdate()
const DeleteTicketEmbed = new Discord.MessageEmbed()
.setDescription(supportbot.TicketDeleteMessage)
.setColor(supportbot.EmbedColour)
interaction.channel.send({embeds: [DeleteTicketEmbed]})
let logChannel = interaction.guild.channels.cache.find(channel => channel.name === supportbot.TranscriptLog) || interaction.guild.channels.cache.find(channel => channel.id === supportbot.TranscriptLog)
let user = interaction.user
let name = interaction.channel.name;
let ticketChannel = interaction.channel
let reason = "No Reason Provided."
interaction.channel.send({content: `**${supportbot.ClosingTicket}**`})
.then(() => {
const logEmbed = new Discord.MessageEmbed()
.setTitle(supportbot.TranscriptTitle)
.setColor(supportbot.EmbedColour)
.setFooter(supportbot.EmbedFooter)
.addField("Closed By", user.username)
.addField("Reason", reason)
interaction.channel.messages.fetch({limit: 100}).then(msgs => {
let html = ''
msgs = msgs.sort( ( a, b ) => a.createdTimestamp - b.createdTimestamp );
html += `<strong>Server Name:</strong> ${interaction.guild.name}<br>`
html += `<strong>Ticket:</strong> ${ticketChannel.name}<br>`
html += `<strong>Message:</strong> ${msgs.size} Messages<br><br><br>`
msgs.forEach(msg => {
if(msg.content) {
html += `<strong>User:</strong> ${msg.author.tag}<br>`;
html += `<strong>Message:</strong> ${msg.content}<br>`;
html += `-----<br><br>`;
}
})
const TranscriptSavedEmbed = new Discord.MessageEmbed()
.setDescription(supportbot.TranscriptSavedMessage)
.setColor(supportbot.SuccessColour)
interaction.channel.send({embeds: [TranscriptSavedEmbed]})
let file = new Discord.MessageAttachment( Buffer.from( html ), `${name}.html` )
logChannel.send({embeds: [logEmbed], files: [file]})
setTimeout(() => interaction.channel.delete(), supportbot.TicketDeleteTime)
})
})
}
}
if(interaction.customId === 'ticketlock') {
if(interaction.channel.name.startsWith(`${supportbot.TicketChannel}`)) {
interaction.message.fetch()
interaction.deferUpdate()
let Admin = interaction.guild.roles.cache.find(AdminUser => AdminUser.name === supportbot.Admin) || interaction.guild.roles.cache.find(AdminUser => AdminUser.id === supportbot.Admin)
let all = interaction.channel.permissionOverwrites.cache
let parent = interaction.guild.channels.cache.find(c => c.name === `${supportbot.LockTicketCategory}`) || interaction.guild.channels.cache.find(c => c.id === `${supportbot.LockTicketCategory}`)
if(parent) {
interaction.channel.setParent(parent.id)
}
all.forEach(perm => {
interaction.channel.permissionOverwrites.delete(perm.id)
})
interaction.channel.permissionOverwrites.create(Admin.id, {VIEW_CHANNEL: true})
interaction.channel.permissionOverwrites.create(interaction.guild.id, {VIEW_CHANNEL: false})
const ticketDeleteButton = new Discord.MessageButton()
.setCustomId('ticketclose')
.setLabel('Close')
.setStyle(supportbot.TicketDeleteColour)
.setEmoji(supportbot.TicketDeleteEmoji)
const row = new Discord.MessageActionRow()
.addComponents(ticketDeleteButton)
const ArchiveEmbed = new Discord.MessageEmbed()
.setTitle("Archived")
.setDescription(`Archived ${interaction.channel.name}`)
.setColor(`${supportbot.SuccessColour}`)
interaction.channel.send({embeds: [ArchiveEmbed]})
interaction.message.edit({components: [row]})
}
}
}
});
Executable → Regular
+43 -17
View File
@@ -1,24 +1,50 @@
// SupportBot 6.0, Created by Emerald Services
// Message Event
// SupportBot | Emerald Services
// Message Create Event
const Discord = require("discord.js");
const fs = require("fs");
const Discord = require("discord.js");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
const supportbot = yaml.load(fs.readFileSync('./Data/supportbot.yml', 'utf8'));
module.exports = async (bot, message) => {
if(message.author.bot) return;
if(message.channel.type === "dm") return;
if (message.content.indexOf(supportbot.Prefix) !== 0) return;
const Event = require("../Structures/Event.js");
let messageArray = message.content.split(" ");
const args = message.content.slice(supportbot.Prefix.length).trim().split(/ +/g);
const command = args.shift().toLowerCase();
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]`, `\u001b[36m`, `${message.author.tag}`, `\u001b[33m`, `has executed the command`, `\u001b[36m`,`${supportbot.Prefix}${command}`)
module.exports = new Event("messageCreate", (client, message) => {
if (message.author.bot) return;
const cmd = bot.commands.get(command);
if(!cmd) return;
cmd.execute(message, args);
};
if (!message.content.startsWith(client.prefix)) return;
const args = message.content.substring(client.prefix.length).split(/ +/);
const command = client.commands.find(cmd => cmd.name == args[0]);
const NotValid = new Discord.MessageEmbed()
.setDescription(`:x: \`${args[0]}\` is an Invalid Command `)
.setColor(supportbot.ErrorColour)
if (!command) return message.reply({
embeds: [NotValid]
});
const OnlySlashCmd = new Discord.MessageEmbed()
.setDescription(`:warning: That command is only useable as a \`Slash Command\` `)
.setColor(supportbot.WarnColour)
if (!["BOTH", "TEXT"].includes(command.type))
return message.reply({
embeds: [OnlySlashCmd]
})
const permission = message.member.permissions.has(command.permission, true);
const ValidPerms = new Discord.MessageEmbed()
.setDescription(":x: Do you have the \`${command.permission}\` permissions to execute this command?")
.setColor(supportbot.ErrorColour)
if (!permission)
return message.reply(
`You do not have the permission \`${command.permission}\` to run this command!`
);
command.run(message, args, client);
});
-36
View File
@@ -1,36 +0,0 @@
// SupportBot 6.0, Created by Emerald Services
// Message Reaction Event
const Discord = require("discord.js");
const fs = require("fs");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
const tickets = yaml.load(fs.readFileSync('./storage/ticketreaction.yml', 'utf8'));
module.exports = async (client, reaction, user) => {
let message = {
guild: reaction.message.channel.guild,
author: user,
content: "N/A",
channel: reaction.message.channel
}
if (supportbot.ReactionTickets) {
if (reaction.message.id === tickets.ReactionMessage_ID) {
if (reaction.emoji.name == supportbot.ReactionEmoji || reaction.emoji.id == supportbot.ReactionEmoji) {
await reaction.users.remove(user.id)
try {
const cmd = client.commands.get(supportbot.NewTicket);
if(!cmd) return;
cmd.execute(message, message.content);
} catch (error) {
console.error(error);
}
}
}
}
};
-26
View File
@@ -1,26 +0,0 @@
const Discord = require("discord.js");
const fs = require("fs");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
module.exports = async (bot, message, packet) => {
if (!['MESSAGE_REACTION_ADD', 'MESSAGE_REACTION_REMOVE'].includes(packet.t)) return;
const channel = bot.channels.cache.get(packet.d.channel_id);
if (channel.messages.has(packet.d.message_id)) return;
channel.messages.fetch(packet.d.message_id).then(message => {
const emoji = packet.d.emoji.id ? `${packet.d.emoji.name}:${packet.d.emoji.id}` : packet.d.emoji.name;
const reaction = message.reactions.get(emoji);
if (reaction) reaction.users.set(packet.d.user_id, bot.users.get(packet.d.user_id));
if (packet.t === 'MESSAGE_REACTION_ADD') {
bot.emit('messageReactionAdd', reaction, bot.users.get(packet.d.user_id));
}
if (packet.t === 'MESSAGE_REACTION_REMOVE') {
bot.emit('messageReactionRemove', reaction, bot.users.get(packet.d.user_id));
}
});
}
+30 -29
View File
@@ -1,21 +1,21 @@
// SupportBot 6.0, Created by Emerald Services
// SupportBot | Emerald Services
// Ready Event
const Discord = require("discord.js");
const fs = require("fs");
const { MessageActionRow, MessageButton } = require('discord.js');
const Discord = require("discord.js");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
const tickets = yaml.load(fs.readFileSync('./storage/ticketreaction.yml', 'utf8'));
const supportbot = yaml.load(fs.readFileSync('./Data/supportbot.yml', 'utf8'));
const panelconfig = yaml.load(fs.readFileSync('./Data/ticket-panel.yml', 'utf8'));
module.exports = async bot => {
bot.user.setActivity(supportbot.BotActivity, {
const Event = require("../Structures/Event.js");
module.exports = new Event("ready", client => {
client.user.setActivity(supportbot.BotActivity, {
type: supportbot.ActivityType,
url: supportbot.StreamingURL
});
console.log(`\u001b[32m`, `┏━━━┓╋╋╋╋╋╋╋╋╋╋╋╋╋┏┓┏━━┓╋╋╋┏┓`)
console.log(`\u001b[32m`, `┃┏━┓┃╋╋╋╋╋╋╋╋╋╋╋╋┏┛┗┫┏┓┃╋╋┏┛┗┓`)
console.log(`\u001b[32m`, `┃┗━━┳┓┏┳━━┳━━┳━━┳┻┓┏┫┗┛┗┳━┻┓┏┛`)
@@ -27,7 +27,8 @@ module.exports = async bot => {
console.log(` `)
console.log(`\u001b[31m`, `――――――――――――――――――――――――――――――――――――――――――――`)
console.log(` `)
console.log(`\u001b[33m`, `${supportbot.Bot_Name} v${supportbot.SupportBot_Version}`, `\u001b[36m`, `Connected to Discord`)
console.log(`\u001b[33m`, `${supportbot.Name} v${supportbot.SupportBot_Version}`, `\u001b[36m`, `Connected to Discord`)
console.log(`\u001b[33m`, `Resources:`, `\u001b[36m`, `https://emeraldsrv.dev/resources`)
console.log(`\u001b[33m`, `Documentation:`, `\u001b[36m`, `https://supportbot.emeraldsrv.dev`)
console.log(`\u001b[33m`, `Discord:`, `\u001b[36m`, `https://emeraldsrv.dev/discord`)
console.log(`\u001b[33m`, `Hosting:`, `\u001b[36m`, `https://emeraldsrv.dev/hosting`)
@@ -35,41 +36,41 @@ module.exports = async bot => {
console.log(`\u001b[37m`, `SupportBot proudly created by Emerald Services`)
console.log(` `)
console.log(`\u001b[31m`, `――――――――――――――――――――――――――――――――――――――――――――`)
if (supportbot.ReactionTickets) {
let chan1 = bot.channels.cache.find(channel => channel.name === supportbot.ReactionChannel)
if (panelconfig.TicketPanel) {
let chan1 = client.channels.cache.find(channel => channel.name === panelconfig.Channel)
if (!chan1) {
console.log('\u001b[33m', "[WARN] Ticket reaction panel is not setup, You can do so via the configuration file!")
return false;
}
chan1.messages.fetch(tickets.ReactionMessage_ID).catch(async r => {
const panelid = yaml.load(fs.readFileSync('./Data/ticket-panel-id.yml', 'utf8'));
chan1.messages.fetch(panelid.TicketPanelID).catch(async r => {
let embed = new Discord.MessageEmbed()
.setTitle(supportbot.ReactionMessage.replace(/%reaction_emoji%/g, supportbot.ReactionEmoji))
.setTitle(`${panelconfig.PanelTitle}`)
.setColor(supportbot.SuccessColour)
.setFooter(supportbot.EmbedFooter);
if (supportbot.ReactionPanel_Description) {
embed.setDescription(supportbot.ReactionDescription)
if (panelconfig.TicketPanel_Description) {
embed.setDescription(panelconfig.PanelMessage)
}
if (supportbot.ReactionPanel_Thumbnail) {
embed.setThumbnail(supportbot.ReactionThumbnail)
if (panelconfig.TicketPanel_Thumbnail) {
embed.setThumbnail(panelconfig.PanelThumbnail)
}
if (supportbot.ReactionPanel_Image) {
embed.setImage(supportbot.ReactionImage)
if (panelconfig.TicketPanel_Image) {
embed.setImage(panelconfig.PanelImage)
}
let button = new MessageButton()
.setLabel('Open Ticket')
let button = new Discord.MessageButton()
.setLabel(panelconfig.ButtonLabel)
.setCustomId('openticket')
.setStyle('PRIMARY')
.setStyle(panelconfig.ButtonColour)
let row = new MessageActionRow()
let row = new Discord.MessageActionRow()
.addComponents(button)
@@ -78,10 +79,10 @@ module.exports = async bot => {
components: [row]
}).then(r => {
let data = {
"ReactionMessage_ID": `${r.id}`
"TicketPanelID": `${r.id}`
}
let yamlStr = yaml.dump(data);
fs.writeFileSync('./storage/ticketreaction.yml', yamlStr, 'utf8');
fs.writeFileSync('./Data/ticket-panel-id.yml', yamlStr, 'utf8');
}).catch(e => {
console.log("Raw"+e)
@@ -89,4 +90,4 @@ module.exports = async bot => {
})
}
};
});
Executable → Regular
+6 -94
View File
@@ -8,105 +8,17 @@
// Installed with MIT License
//
// Discord Support: https://emeraldsrv.dev/discord
// const Discord = require("discord.js");
const { Client, Intents, Collection } = require("discord.js");
// Community Resources: https://emeraldsrv.dev/resources
const fs = require("fs");
const bot = new Client({
intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES]
});
const { REST } = require('@discordjs/rest');
bot.commands = new Collection();
const Discord = require("discord.js");
const yaml = require('js-yaml');
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
const supportbot = yaml.load(fs.readFileSync('./Data/supportbot.yml', 'utf8'));
const { promisify } = require("util");
const readdir = promisify(require("fs").readdir);
const Client = require("./Structures/Client.js");
const client = new Client({});
String.prototype.toProperCase = function () {
return this.replace(
/([^\W_]+[^\s-]*) */g,
(txt) => txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase()
);
};
client.start(supportbot.Token);
const init = async () => {
const evtFiles = await readdir("./events/");
console.info(`\u001b[36m`, `➢ SupportBot Events`);
console.info(` `);
evtFiles.forEach((file, i) => {
const eventName = file.split(".")[0];
const event = require(`./events/${file}`);
console.info(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[36m`, `#${i + 1} Event Loaded: ${eventName.toProperCase()} `);
bot.on(eventName, event.bind(null, bot));
delete require.cache[require.resolve(`./events/${file}`)];
});
console.info(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[36m`, `Successfully loaded ${evtFiles.length} events.`);
console.log(`\u001b[31m`, `――――――――――――――――――――――――――――――――――――――――――――`)
console.log(` `)
};
init();
fs.readdir("./commands/", async (err, files) => {
console.info(`\u001b[36m`, `➢ SupportBot Commands`);
console.info(` `);
if (err) console.info(err, "error");
let jsfiles = files.filter((f) => f.split(".").pop() === "js");
if (jsfiles.length <= 0) {
console.log(`[${supportbot.Bot_Name}]: No commands found. Try to Re-download the resource`);
return;
}
jsfiles.forEach((f, i) => {
let props = require(`./commands/${f}`);
console.info(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[36m`, `#${i + 1} Command Loaded: ${props.name.toProperCase()}`);
bot.commands.set(props.name, props);
});
console.info(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[36m`, `Loaded ${jsfiles.length} commands!`);
console.log(`\u001b[31m`, `――――――――――――――――――――――――――――――――――――――――――――`)
console.log(` `)
});
fs.readdir("./addons/", (err, files) => {
console.info(`\u001b[36m`, `➢ SupportBot Addons`);
console.info(` `);
if (err) console.info(err, "error");
let jsfiles = files.filter((f) => f.split(".").pop() === "js");
if (jsfiles.length <= 0) {
console.log(`[${supportbot.Bot_Name}]: No addons found. You can download addons from https://emeraldsrv.dev`);
return;
}
jsfiles.forEach((f, i) => {
let props = require(`./addons/${f}`);
console.info(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[36m`, `#${i + 1} Addon Loaded: ${props.name.toProperCase()}`);
bot.commands.set(props.name, props);
});
console.info(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[36m`, `Loaded ${jsfiles.length} addons!`);
console.log(`\u001b[31m`, `――――――――――――――――――――――――――――――――――――――――――――`)
console.log(` `)
});
bot.login(supportbot.Token);
-8
View File
@@ -1,8 +0,0 @@
SupportBot Language Compatibility
In order to switch languages simple remove the current existig configuration file and replace it with one of the files here renamnig the file to "supportbot-config.yml" from (for example) "supportbot-config_es.yml" to home directory of SupportBot.
-> Delete the existing supportbot-config.yml file
-> Download the new file for whatever language
-> Upload the file to SupportBot and rename it to supportbot-config.yml
-> Job Done, restart the bot :wink:
-310
View File
@@ -1,310 +0,0 @@
# ___ _ ___ _
# / __> _ _ ___ ___ ___ _ _ _| |_ | . > ___ _| |_
# \__ \| | || . \| . \/ . \| '_> | | | . \/ . \ | |
# <___/`___|| _/| _/\___/|_| |_| |___/\___/ |_|
# |_| |_|
#
# SupportBot created by Emerald Services
# Installed with MIT License
#
# Discord Support: https://emeraldsrv.dev/discord
SupportBot_Version: "7.1 pre-1"
# -------------------------
# General Configuration
# -------------------------
Token: "BOT_TOKEN_HERE"
Prefix: "!!"
Bot_Name: "SupportBot"
DeleteMessages: true
# Should the bot delete command messages after executed?
# -------------------------
# Activity Configuration
# -------------------------
BotActivity: "-help | SupportBot"
StreamingURL: "https://www.twitch.tv/YOUR_TWITCH_NAME"
# Set The ActivityType to "STREAMING" for a streaming status!
ActivityType: "PLAYING"
# Activity status can either be PLAYING, WATCHING, LISTENING or STREAMING.
# -------------------------
# Embed Configuration
# -------------------------
EmbedColour: "#f74343"
EmbedFooter: "SupportBot | The #1 Supportive Discord Bot"
ErrorColour: "#d12519"
SuccessColour: "#04b545"
WarningColour: "#fca117"
# -------------------------
# Help Configuration
# -------------------------
HelpMenu: true # Do not change!
SendHelpPage: "channel" # Set to channel or dm
# -------------------------
# Role Configuration
# -------------------------
AutoRole: true
AutoRole_Role: "Member"
LockdownRole: "@everyone"
Staff: "Staff"
Admin: "Admin"
TicketBlackListRole: "Blacklisted"
# -------------------------
# Tickets Configuration
# -------------------------
# --- General Config ---
# --- Start ---
TicketCategory: "▬▬ TICKETS ▬▬"
TicketChannel: "ticket"
TicketLog: "ticket-logs"
TranscriptLog: "transcripts"
TranscriptTitle: "Ticket Transcript"
TicketBlackListMessage: "You are not allowed to open a ticket"
TicketSubject: "description"
# "description" will displays the ticket reason within the channel description
# "embed" will displays the ticket reason within the ticket embed
AllowTicketMentions: true
# Set to true to allow the ticket to mention the author and the support team.
# Set to false to dis-allow mentions within tickets.
# --- Panel Config ---
# --- Start ---
ReactionChannel: "create-ticket"
ReactionEmoji: "📩"
# For cusomt emojis: <:emoji_name:EMOJI_ID>
ReactionTickets: true
ReactionMessage: "React with %reaction_emoji% to create a Support Ticket!"
ReactionPanel_Description: true
ReactionDescription: "Create a support ticket to contact a member of staff."
ReactionPanel_Thumbnail: true
ReactionThumbnail: "https://hotemoji.com/images/dl/5/ticket-emoji-by-twitter.png"
ReactionPanel_Image: true
ReactionImage: "https://wallpapercave.com/wp/wp4462546.jpg"
# --- Creation Config ---
# --- Start ---
# Available Placeholders:
# %ticketusername% - User who created the ticket.
# <@%ticketauthor%> - Tags the user who created the ticket.
# <#%ticketid%> - Mentions the ticket channel.
Ticket_Title: "Server Support | %ticketusername%"
TicketMessage: "Hello <@%ticketauthor%>, Thank you for creating a support ticket\nPlease wait patiently whilst a member of our team reaches out to you."
Ticket_Thumbnail: "https://images.emojiterra.com/google/android-pie/512px/1f39f.png"
NoTicketSubject: "No Reason Provided!"
TicketCreatedAlert: ":ticket: Your support ticket has been created: <#%ticketid%>"
AddedUser: "👍 <@%user%> has been added to this ticket"
RemovedUser: "👍 <@%user%> has been removed from this ticket"
TicketLockReaction: "🔒"
TicketDeleteReaction: "⛔"
TranscriptSavedMessage: "📝 **Transcript Saved!**"
TicketLockMessage: "❌ **Ticket Locked!**"
TicketDeleteMessage: "⚠ **Ticket Deleting!**" # Tickets deleting after 5 seconds by default.
TicketDeleteTime: 5000 # Time must be set in miliseconds.
# --- Closing Config ---
# --- Start ---
ClosingTicket: ":warning: You have requested to close your support ticket."
ClosingConfirmation_Word: "confirm"
CloseConfirmation: true
# --- Departments Config ---
# --- Start ---
TicketDepartments: true
AllowStaff: true
# If set to true users with the "Staff" role will not be able to view tickets
# without a valid department role set below.
# Set to false to allow "Staff" to see tickets whether its a department for them or not.
DepartmentEmoji_1: "🙋"
DepartmentEmoji_2: "💸"
DepartmentEmoji_3: "📗"
# Ticket emojis, the emojis are what users will need to react with inorder to proceed furthur if departments are enabled.
DepartmentTitle_1: "Support"
DepartmentTitle_2: "Billing"
DepartmentTitle_3: "Other"
# Ticket department title, This is the title for a ticket department to help users know what is available.
DepartmentRole_1: "Support"
DepartmentRole_2: "Admin"
DepartmentRole_3: "Support"
# Ticket roles are the roles that will be able to gain access to tickets depending on what department has been choosen.
# --------------------------------
# System Messages Configuration
# --------------------------------
# Available Placeholders:
# %guildname% - This displays the name of the discord server.
SystemMessages: true
SystemMessage_EmbedFooter: false
SystemMessage_Channel: "system-messages"
SystemMessage_Type: "embed"
# There are 2 types of how you can send system messages, 'normal' or 'embed'
SystemMessage_Icon: "USER"
# USER - This will display the user's icon of who joins.
# BOT - This will display the bot's icon when a someone joins.
Welcome_Title: "User Joined!"
WelcomeMessage: "Hello %member%, Welcome to %guildname%!"
# %member% define the user who joined and %guildnamne% defines the server name.
Leave_Title: "User Left!"
LeaveMessage: "Goodbye %member%, Thank you for visting %guildname%!"
# %member% define the user who left and %guildnamne% defines the server name.
# -------------------------
# Links Configuration
# -------------------------
LinksTitle: "Server Links"
LINKS:
"Website": "https://www.example.com"
"Store": "https://store.example.com"
"Discord": "https://discord.gg/example"
# "Twitter": "https://twitter.com/example"
# "Add More": "Just follow this format!"
# --------------------------
# Suggestion Configuration
# --------------------------
SuggestionChannel: "suggestions"
SuggestionTitle: "Suggestion"
SuggestionStarter: "What would you like to suggest?"
SuggestReact_1: 👍
SuggestReact_2: 👎
# ----------------------------
# Announcement Configuration
# ----------------------------
AnnouncementChannel: "announcements"
AnnouncementTitle: "Servername Announcement"
AnnouncementIcon: "https://i.imgur.com/HbkZyB7.png"
AnnouncementStarter: "What would you like to announce?"
# --------------------------
# Moderation Configuration
# --------------------------
BanTitle: "User Banned!"
DaysBannedFor: 7
BanLogColour: "#D911B4"
KickTitle: "User Kicked!"
KickLogColour: "#D9B111"
ModThumbnail: "https://i.imgur.com/l6P3DF6.png"
ModLogChannel: "mod-logs"
PruneLogTitle: "Bulk Delete"
PruneThumbnail: "https://i.imgur.com/OAgW2vR.png"
PruneColour: "#1BA30C"
BlacklistTitle: "Blacklisted User"
BlacklistColour: "#000000"
# --------------------------
# Command Configuration
# --------------------------
# --- User Commands ---
HelpCommand: "help"
LinksCommand: "links"
PingCommand: "ping"
SuggestCommand: "suggest"
# --- Ticket Commands ---
NewTicket: "ticket"
CloseTicket: "close"
AddUser: "add"
RemoveUser: "remove"
RenameTicket: "rename"
# --- Staff/Admin Commands ---
BotSay: "say"
PurgeMessage: "purge"
AnnounceCommand: "announce"
BanUser: "ban"
KickUser: "kick"
BlacklistUser: "blacklist"
# --------------------------
# Messages Configuration
# --------------------------
# --- Command Messages ---
NewTicketDesc: "Create a new support ticket"
AnnounceDesc: "Create a server announcement"
CloseTicketDesc: "Close your support ticket"
LinksDesc: "View some important links"
PingDesc: "Get the bot's latency"
HelpDesc: "Get a list of all the commands"
RemoveUserDesc: "Remove a user from a support ticket"
AddUserDesc: "Add a user to a support ticket"
SuggestionDesc: "Create a server suggestion"
BotSayDesc: "Say something with the bot"
BanDesc: "Ban a member from this server."
KickDesc: "Kick a member from this server."
PurgeDesc: "Purge messages from the chat."
BlacklistDesc: "Decline a member to open a ticket"
# Error / Warning Messages
IncorrectPerms: ":x: **Err!** You do not have the correct permissions to use this command."
InvalidChannel: ":x: **Err!** Channel not found. Please create it!"
UserNotFound: ":x: **Err!** This user doesn't exist, Are they in this server?"
NoValidTicket: ":warning: You cannot execute this command here. This command is used when closing a ticket."
TicketExists: ":warning: This ticket cannot be opened, It already exists!"
Generated Vendored
BIN
View File
Binary file not shown.
Generated Vendored
-1
View File
@@ -1 +0,0 @@
../acorn/bin/acorn
-1
View File
@@ -1 +0,0 @@
../escodegen/bin/escodegen.js
-1
View File
@@ -1 +0,0 @@
../escodegen/bin/esgenerate.js
Generated Vendored
-1
View File
@@ -1 +0,0 @@
../esprima/bin/esparse.js
-1
View File
@@ -1 +0,0 @@
../esprima/bin/esvalidate.js
+36 -628
View File
@@ -1,6 +1,6 @@
{
"name": "supportbot",
"version": "7.1",
"version": "7.2.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
@@ -20,14 +20,6 @@
"npm": ">=7.0.0"
}
},
"node_modules/@discordjs/builders/node_modules/discord-api-types": {
"version": "0.22.0",
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.22.0.tgz",
"integrity": "sha512-l8yD/2zRbZItUQpy7ZxBJwaLX/Bs2TGaCthRppk8Sw24LOIWg12t9JEreezPoYD0SQcC2htNNo27kYEpYW/Srg==",
"engines": {
"node": ">=12"
}
},
"node_modules/@discordjs/collection": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.2.1.tgz",
@@ -49,51 +41,6 @@
"node": ">= 6"
}
},
"node_modules/@discordjs/rest": {
"version": "0.1.0-canary.0",
"resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-0.1.0-canary.0.tgz",
"integrity": "sha512-d+s//ISYVV+e0w/926wMEeO7vju+Pn11x1JM4tcmVMCHSDgpi6pnFCNAXF1TEdnDcy7xf9tq5cf2pQkb/7ySTQ==",
"dependencies": {
"@discordjs/collection": "^0.1.6",
"@sapphire/async-queue": "^1.1.4",
"@sapphire/snowflake": "^1.3.5",
"abort-controller": "^3.0.0",
"discord-api-types": "^0.18.1",
"form-data": "^4.0.0",
"node-fetch": "^2.6.1",
"tslib": "^2.3.0"
},
"engines": {
"node": ">=16.0.0"
}
},
"node_modules/@discordjs/rest/node_modules/@discordjs/collection": {
"version": "0.1.6",
"resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.1.6.tgz",
"integrity": "sha512-utRNxnd9kSS2qhyivo9lMlt5qgAUasH2gb7BEOn6p0efFh24gjGomHzWKMAPn2hEReOPQZCJaRKoURwRotKucQ=="
},
"node_modules/@discordjs/rest/node_modules/discord-api-types": {
"version": "0.18.1",
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.18.1.tgz",
"integrity": "sha512-hNC38R9ZF4uaujaZQtQfm5CdQO58uhdkoHQAVvMfIL0LgOSZeW575W8H6upngQOuoxWd8tiRII3LLJm9zuQKYg==",
"deprecated": "No longer supported. Install the latest release (0.20.2)",
"engines": {
"node": ">=12"
}
},
"node_modules/@discordjs/rest/node_modules/form-data": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
"integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/@sapphire/async-queue": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.1.4.tgz",
@@ -103,20 +50,10 @@
"npm": ">=6"
}
},
"node_modules/@sapphire/snowflake": {
"version": "1.3.6",
"resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-1.3.6.tgz",
"integrity": "sha512-QnzuLp+p9D7agynVub/zqlDVriDza9y3STArBhNiNBUgIX8+GL5FpQxstRfw1jDr5jkZUjcuKYAHxjIuXKdJAg==",
"deprecated": "This version has been automatically deprecated by @favware/npm-deprecate. Please use a newer version.",
"engines": {
"node": ">=12",
"npm": ">=6"
}
},
"node_modules/@sindresorhus/is": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.0.1.tgz",
"integrity": "sha512-Qm9hBEBu18wt1PO2flE7LPb30BHMQt1eQgbV76YntdNk73XZGpn3izvGTYxbGgzXKgbCjiia0uxTd3aTNQrY/g==",
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.2.0.tgz",
"integrity": "sha512-VkE3KLBmJwcCaVARtQpfuKcKv8gcBmUubrfHGF84dXuuW6jgsRYxPtzcIhPyK9WAPpRt2/xY6zkD9MnRaJzSyw==",
"engines": {
"node": ">=10"
},
@@ -124,18 +61,10 @@
"url": "https://github.com/sindresorhus/is?sponsor=1"
}
},
"node_modules/@tootallnate/once": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz",
"integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==",
"engines": {
"node": ">= 6"
}
},
"node_modules/@types/node": {
"version": "16.7.1",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.7.1.tgz",
"integrity": "sha512-ncRdc45SoYJ2H4eWU9ReDfp3vtFqDYhjOsKlFFUDEn8V1Bgr2RjYal8YT5byfadWIRluhPFU6JiDOl0H6Sl87A=="
"version": "16.10.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.10.2.tgz",
"integrity": "sha512-zCclL4/rx+W5SQTzFs9wyvvyCwoK9QtBpratqz2IYJ3O8Umrn0m3nsTv0wQBk9sRGpvUe9CwPDrQFB10f1FIjQ=="
},
"node_modules/@types/ws": {
"version": "7.4.7",
@@ -145,72 +74,6 @@
"@types/node": "*"
}
},
"node_modules/abab": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz",
"integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q=="
},
"node_modules/abort-controller": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
"integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
"dependencies": {
"event-target-shim": "^5.0.0"
},
"engines": {
"node": ">=6.5"
}
},
"node_modules/acorn": {
"version": "8.4.1",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.4.1.tgz",
"integrity": "sha512-asabaBSkEKosYKMITunzX177CXxQ4Q8BSSzMTKD+FefUhipQC70gfW5SiUDhYQ3vk8G+81HqQk7Fv9OXwwn9KA==",
"bin": {
"acorn": "bin/acorn"
},
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/acorn-globals": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz",
"integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==",
"dependencies": {
"acorn": "^7.1.1",
"acorn-walk": "^7.1.1"
}
},
"node_modules/acorn-globals/node_modules/acorn": {
"version": "7.4.1",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz",
"integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
"bin": {
"acorn": "bin/acorn"
},
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/acorn-walk": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz",
"integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==",
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/agent-base": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
"integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
"dependencies": {
"debug": "4"
},
"engines": {
"node": ">= 6.0.0"
}
},
"node_modules/argparse": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
@@ -221,11 +84,6 @@
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
},
"node_modules/browser-process-hrtime": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz",
"integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow=="
},
"node_modules/callsites": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
@@ -245,66 +103,6 @@
"node": ">= 0.8"
}
},
"node_modules/cssom": {
"version": "0.4.4",
"resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz",
"integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw=="
},
"node_modules/cssstyle": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz",
"integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==",
"dependencies": {
"cssom": "~0.3.6"
},
"engines": {
"node": ">=8"
}
},
"node_modules/cssstyle/node_modules/cssom": {
"version": "0.3.8",
"resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz",
"integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg=="
},
"node_modules/data-urls": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz",
"integrity": "sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==",
"dependencies": {
"abab": "^2.0.3",
"whatwg-mimetype": "^2.3.0",
"whatwg-url": "^8.0.0"
},
"engines": {
"node": ">=10"
}
},
"node_modules/debug": {
"version": "4.3.2",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz",
"integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==",
"dependencies": {
"ms": "2.1.2"
},
"engines": {
"node": ">=6.0"
},
"peerDependenciesMeta": {
"supports-color": {
"optional": true
}
}
},
"node_modules/decimal.js": {
"version": "10.3.1",
"resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.3.1.tgz",
"integrity": "sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ=="
},
"node_modules/deep-is": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz",
"integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ="
},
"node_modules/delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
@@ -314,9 +112,9 @@
}
},
"node_modules/discord-api-types": {
"version": "0.23.1",
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.23.1.tgz",
"integrity": "sha512-igWmn+45mzXRWNEPU25I/pr8MwxHb767wAr51oy3VRLRcTlp5ADBbrBR0lq3SA1Rfw3MtM4TQu1xo3kxscfVdQ==",
"version": "0.22.0",
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.22.0.tgz",
"integrity": "sha512-l8yD/2zRbZItUQpy7ZxBJwaLX/Bs2TGaCthRppk8Sw24LOIWg12t9JEreezPoYD0SQcC2htNNo27kYEpYW/Srg==",
"engines": {
"node": ">=12"
}
@@ -340,33 +138,6 @@
"npm": ">=7.0.0"
}
},
"node_modules/discord.js/node_modules/discord-api-types": {
"version": "0.22.0",
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.22.0.tgz",
"integrity": "sha512-l8yD/2zRbZItUQpy7ZxBJwaLX/Bs2TGaCthRppk8Sw24LOIWg12t9JEreezPoYD0SQcC2htNNo27kYEpYW/Srg==",
"engines": {
"node": ">=12"
}
},
"node_modules/domexception": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz",
"integrity": "sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg==",
"dependencies": {
"webidl-conversions": "^5.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/domexception/node_modules/webidl-conversions": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz",
"integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==",
"engines": {
"node": ">=8"
}
},
"node_modules/dot-prop": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-6.0.1.tgz",
@@ -381,128 +152,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/escodegen": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz",
"integrity": "sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==",
"dependencies": {
"esprima": "^4.0.1",
"estraverse": "^5.2.0",
"esutils": "^2.0.2",
"optionator": "^0.8.1"
},
"bin": {
"escodegen": "bin/escodegen.js",
"esgenerate": "bin/esgenerate.js"
},
"engines": {
"node": ">=6.0"
},
"optionalDependencies": {
"source-map": "~0.6.1"
}
},
"node_modules/esprima": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
"bin": {
"esparse": "bin/esparse.js",
"esvalidate": "bin/esvalidate.js"
},
"engines": {
"node": ">=4"
}
},
"node_modules/estraverse": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz",
"integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==",
"engines": {
"node": ">=4.0"
}
},
"node_modules/esutils": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
"integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/event-target-shim": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
"integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==",
"engines": {
"node": ">=6"
}
},
"node_modules/fast-levenshtein": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
"integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc="
},
"node_modules/form-data": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz",
"integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==",
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/html-encoding-sniffer": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz",
"integrity": "sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==",
"dependencies": {
"whatwg-encoding": "^1.0.5"
},
"engines": {
"node": ">=10"
}
},
"node_modules/http-proxy-agent": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz",
"integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==",
"dependencies": {
"@tootallnate/once": "1",
"agent-base": "6",
"debug": "4"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/https-proxy-agent": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz",
"integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==",
"dependencies": {
"agent-base": "6",
"debug": "4"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/iconv-lite": {
"version": "0.4.24",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
"dependencies": {
"safer-buffer": ">= 2.1.2 < 3"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/is-obj": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
@@ -511,11 +160,6 @@
"node": ">=8"
}
},
"node_modules/is-potential-custom-element-name": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz",
"integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ=="
},
"node_modules/js-yaml": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
@@ -527,124 +171,39 @@
"js-yaml": "bin/js-yaml.js"
}
},
"node_modules/jsdom": {
"version": "16.7.0",
"resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz",
"integrity": "sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw==",
"dependencies": {
"abab": "^2.0.5",
"acorn": "^8.2.4",
"acorn-globals": "^6.0.0",
"cssom": "^0.4.4",
"cssstyle": "^2.3.0",
"data-urls": "^2.0.0",
"decimal.js": "^10.2.1",
"domexception": "^2.0.1",
"escodegen": "^2.0.0",
"form-data": "^3.0.0",
"html-encoding-sniffer": "^2.0.1",
"http-proxy-agent": "^4.0.1",
"https-proxy-agent": "^5.0.0",
"is-potential-custom-element-name": "^1.0.1",
"nwsapi": "^2.2.0",
"parse5": "6.0.1",
"saxes": "^5.0.1",
"symbol-tree": "^3.2.4",
"tough-cookie": "^4.0.0",
"w3c-hr-time": "^1.0.2",
"w3c-xmlserializer": "^2.0.0",
"webidl-conversions": "^6.1.0",
"whatwg-encoding": "^1.0.5",
"whatwg-mimetype": "^2.3.0",
"whatwg-url": "^8.5.0",
"ws": "^7.4.6",
"xml-name-validator": "^3.0.0"
},
"engines": {
"node": ">=10"
},
"peerDependencies": {
"canvas": "^2.5.0"
},
"peerDependenciesMeta": {
"canvas": {
"optional": true
}
}
},
"node_modules/levn": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
"integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=",
"dependencies": {
"prelude-ls": "~1.1.2",
"type-check": "~0.3.2"
},
"engines": {
"node": ">= 0.8.0"
}
},
"node_modules/lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
},
"node_modules/lodash.isequal": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz",
"integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA="
},
"node_modules/mime-db": {
"version": "1.48.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.48.0.tgz",
"integrity": "sha512-FM3QwxV+TnZYQ2aRqhlKBMHxk10lTbMt3bBkMAp54ddrNeVSfcQYOOKuGuy3Ddrm38I04If834fOUSq1yzslJQ==",
"version": "1.50.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.50.0.tgz",
"integrity": "sha512-9tMZCDlYHqeERXEHO9f/hKfNXhre5dK2eE/krIvUjZbS2KPcqGDfNShIWS1uW9XOTKQKqK6qbeOci18rbfW77A==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/mime-types": {
"version": "2.1.31",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.31.tgz",
"integrity": "sha512-XGZnNzm3QvgKxa8dpzyhFTHmpP3l5YNusmne07VUOXxou9CqUqYa/HBy124RqtVh/O2pECas/MOcsDgpilPOPg==",
"version": "2.1.33",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.33.tgz",
"integrity": "sha512-plLElXp7pRDd0bNZHw+nMd52vRYjLwQjygaNg7ddJ2uJtTlmnTCjWuPKxVu6//AdaRuME84SvLW91sIkBqGT0g==",
"dependencies": {
"mime-db": "1.48.0"
"mime-db": "1.50.0"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"node_modules/node-fetch": {
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
"integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==",
"engines": {
"node": "4.x || >=6.0.0"
}
},
"node_modules/nwsapi": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz",
"integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ=="
},
"node_modules/optionator": {
"version": "0.8.3",
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz",
"integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==",
"version": "2.6.5",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.5.tgz",
"integrity": "sha512-mmlIVHJEu5rnIxgEgez6b9GgWXbkZj5YZ7fx+2r94a2E+Uirsp6HsPTPlomfdHtpt/B0cdKviwkoaM6pyvUOpQ==",
"dependencies": {
"deep-is": "~0.1.3",
"fast-levenshtein": "~2.0.6",
"levn": "~0.3.0",
"prelude-ls": "~1.1.2",
"type-check": "~0.3.2",
"word-wrap": "~1.2.3"
"whatwg-url": "^5.0.0"
},
"engines": {
"node": ">= 0.8.0"
"node": "4.x || >=6.0.0"
}
},
"node_modules/ow": {
@@ -666,85 +225,10 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/parse5": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz",
"integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw=="
},
"node_modules/prelude-ls": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
"integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=",
"engines": {
"node": ">= 0.8.0"
}
},
"node_modules/psl": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz",
"integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ=="
},
"node_modules/punycode": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
"engines": {
"node": ">=6"
}
},
"node_modules/safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"node_modules/saxes": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz",
"integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==",
"dependencies": {
"xmlchars": "^2.2.0"
},
"engines": {
"node": ">=10"
}
},
"node_modules/source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"optional": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/symbol-tree": {
"version": "3.2.4",
"resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz",
"integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw=="
},
"node_modules/tough-cookie": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz",
"integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==",
"dependencies": {
"psl": "^1.1.33",
"punycode": "^2.1.1",
"universalify": "^0.1.2"
},
"engines": {
"node": ">=6"
}
},
"node_modules/tr46": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz",
"integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==",
"dependencies": {
"punycode": "^2.1.1"
},
"engines": {
"node": ">=8"
}
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o="
},
"node_modules/ts-mixer": {
"version": "6.0.0",
@@ -756,17 +240,6 @@
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
"integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
},
"node_modules/type-check": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
"integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=",
"dependencies": {
"prelude-ls": "~1.1.2"
},
"engines": {
"node": ">= 0.8.0"
}
},
"node_modules/type-fest": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz",
@@ -778,14 +251,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/universalify": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
"integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
"engines": {
"node": ">= 4.0.0"
}
},
"node_modules/vali-date": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/vali-date/-/vali-date-1.0.0.tgz",
@@ -794,71 +259,24 @@
"node": ">=0.10.0"
}
},
"node_modules/w3c-hr-time": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz",
"integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==",
"dependencies": {
"browser-process-hrtime": "^1.0.0"
}
},
"node_modules/w3c-xmlserializer": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz",
"integrity": "sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==",
"dependencies": {
"xml-name-validator": "^3.0.0"
},
"engines": {
"node": ">=10"
}
},
"node_modules/webidl-conversions": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz",
"integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==",
"engines": {
"node": ">=10.4"
}
},
"node_modules/whatwg-encoding": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz",
"integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==",
"dependencies": {
"iconv-lite": "0.4.24"
}
},
"node_modules/whatwg-mimetype": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz",
"integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g=="
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE="
},
"node_modules/whatwg-url": {
"version": "8.7.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.7.0.tgz",
"integrity": "sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==",
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=",
"dependencies": {
"lodash": "^4.7.0",
"tr46": "^2.1.0",
"webidl-conversions": "^6.1.0"
},
"engines": {
"node": ">=10"
}
},
"node_modules/word-wrap": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
"integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==",
"engines": {
"node": ">=0.10.0"
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"node_modules/ws": {
"version": "7.5.1",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.5.1.tgz",
"integrity": "sha512-2c6faOUH/nhoQN6abwMloF7Iyl0ZS2E9HGtsiLrWn0zOOMWlhtDmdf/uihDt6jnuCxgtwGBNy6Onsoy2s2O2Ow==",
"version": "7.5.5",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.5.5.tgz",
"integrity": "sha512-BAkMFcAzl8as1G/hArkxOxq3G7pjUqQ3gzYbLL0/5zNkph70e+lCoxBGnm6AW1+/aiNeV4fnKqZ8m4GZewmH2w==",
"engines": {
"node": ">=8.3.0"
},
@@ -874,16 +292,6 @@
"optional": true
}
}
},
"node_modules/xml-name-validator": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz",
"integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw=="
},
"node_modules/xmlchars": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz",
"integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw=="
}
}
}
BIN
View File
Binary file not shown.
@@ -1,21 +0,0 @@
MIT License
Copyright (c) 2020 vladfrangu
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -1,97 +0,0 @@
# Discord API Types
[![GitHub](https://img.shields.io/github/license/discordjs/discord-api-types)](https://github.com/discordjs/discord-api-types/blob/main/LICENSE.md)
[![npm](https://img.shields.io/npm/v/discord-api-types?color=crimson&logo=npm)](https://www.npmjs.com/package/discord-api-types)
[![deno](https://img.shields.io/npm/v/discord-api-types?color=blue&label=deno&logo=deno)](https://deno.land/x/discord_api_types)
[![Patreon Donate](https://img.shields.io/badge/patreon-donate-brightgreen.svg?label=Donate%20with%20Patreon&logo=patreon&colorB=F96854&link=https://www.patreon.com/vladfrangu)](https://www.patreon.com/vladfrangu)
[![Ko-fi Donate](https://img.shields.io/badge/kofi-donate-brightgreen.svg?label=Donate%20with%20Ko-fi&logo=ko-fi&colorB=F16061&link=https://ko-fi.com/wolfgalvlad&logoColor=FFFFFF)](https://ko-fi.com/wolfgalvlad)
[![GitHub Sponsors](https://img.shields.io/badge/patreon-donate-brightgreen.svg?label=Sponsor%20through%20GitHub&logo=github&colorB=F96854&link=https://github.com/sponsors/vladfrangu)](https://github.com/sponsors/vladfrangu)
Simple type definitions for the [Discord API](https://discord.com/developers/docs/intro).
## Installation
Install with [npm](https://www.npmjs.com/) / [yarn](https://yarnpkg.com) / [pnpm](https://pnpm.js.org/):
```sh
npm install discord-api-types
yarn add discord-api-types
pnpm add discord-api-types
```
### Usage
You can only import this module by specifying the API version you want to target. Append `/v*` to the import path, where the `*` represents the API version. Below are some examples
```js
const { APIUser } = require('discord-api-types/v9');
```
```ts
// TypeScript/ES Module support
import { APIUser } from 'discord-api-types/v9';
```
You may also import just certain parts of the module that you need. The possible values are: `globals`, `gateway`, `gateway/v*`, `payloads`, `payloads/v*`, `rest`, `rest/v*`, `rpc`, `rpc/v*`, `utils`, `utils/v*`, `voice`, and `voice/v*`. Below are some examples
```js
const { GatewayVersion } = require('discord-api-types/gateway/v9');
```
```ts
// TypeScript/ES Module support
import { GatewayVersion } from 'discord-api-types/gateway/v9';
```
> _**Note:** The `v*` exports (`discord-api-type/v*`) include the appropriate version of `gateway`, `payloads`, `rest`, `rpc`, and `utils` you specified, alongside the `globals` exports_
### Deno
We also provide typings compatible with the [deno](https://deno.land/) runtime. You have 3 ways you can import them:
1. Directly from GitHub
```ts
// Importing a specific API version
import { APIUser } from 'https://raw.githubusercontent.com/discordjs/discord-api-types/main/deno/v9.ts';
```
2. From [deno.land/x](https://deno.land/x)
```ts
// Importing a specific API version
import { APIUser } from 'https://deno.land/x/discord_api_types/v9.ts';
```
3. From [skypack.dev](https://www.skypack.dev/)
```ts
// Importing a specific API version
import { APIUser } from 'https://cdn.skypack.dev/discord-api-types/v9?dts';
```
## Project Structure
The exports of each API version is split into three main parts:
- Everything exported with the `API` prefix represents a payload you may get from the REST API _or_ the Gateway.
- Everything exported with the `Gateway` prefix represents data that ONLY comes from or is directly related to the Gateway.
- Everything exported with the `REST` prefix represents data that ONLY comes from or is directly related to the REST API.
- For endpoint options, they will follow the following structure: `REST<HTTP Method><Type><Query|(JSON|FormData)Body|Result>` where the type represents what it will return.
- For example, `RESTPostAPIChannelMessageJSONBody` or `RESTGetAPIGatewayBotInfoResult`.
- Some exported types (specifically OAuth2 related ones) may not respect this entire structure due to the nature of the fields. They will start with either `RESTOAuth2` or with something similar to `REST<HTTP Method>OAuth2`
- If a type ends with `Result`, then it represents the expected result by calling its accompanying route.
- Types that are exported as `never` usually mean the result will be a `204 No Content`, so you can safely ignore it. This does **not** account for errors.
- Anything else that is miscellaneous will be exported based on what it represents (for example the `REST` route object).
- There may be types exported that are identical for all versions. These will be exported as is and can be found in the `globals` file. They will still be prefixed accordingly as described above.
**Warning**: This package documents just KNOWN (and documented) properties. Anything that isn't documented will NOT be added to this package (unless said properties are in an open Pull Request to Discord's [API Documentation repository](https://github.com/discord/discord-api-docs) or known through other means _and have received the green light to be used_). For clarification's sake, this means that properties that are only known through the process of data mining and have not yet been confirmed in a way as described will **NOT** be included.
@@ -1,9 +0,0 @@
/**
* https://discord.com/developers/docs/topics/gateway#connecting-gateway-url-params
*/
export interface GatewayURLQuery {
v: string;
encoding: 'json' | 'etf';
compress?: 'zlib-stream';
}
//# sourceMappingURL=common.d.ts.map
@@ -1 +0,0 @@
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["common.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC/B,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,MAAM,GAAG,KAAK,CAAC;IACzB,QAAQ,CAAC,EAAE,aAAa,CAAC;CACzB"}
@@ -1,3 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=common.js.map
@@ -1 +0,0 @@
{"version":3,"file":"common.js","sourceRoot":"","sources":["common.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
export * from './v9';
//# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAGA,cAAc,MAAM,CAAC"}
@@ -1,16 +0,0 @@
"use strict";
// This file exports all the types available in the recommended gateway version
// Thereby, things MAY break in the future. Try sticking to imports from a specific version
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./v9"), exports);
//# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA,+EAA+E;AAC/E,2FAA2F;;;;;;;;;;;;AAE3F,uCAAqB"}
@@ -1,8 +0,0 @@
import mod from "./index.js";
export default mod;
export const GatewayCloseCodes = mod.GatewayCloseCodes;
export const GatewayDispatchEvents = mod.GatewayDispatchEvents;
export const GatewayIntentBits = mod.GatewayIntentBits;
export const GatewayOpcodes = mod.GatewayOpcodes;
export const GatewayVersion = mod.GatewayVersion;
@@ -1,608 +0,0 @@
/**
* Types extracted from https://discord.com/developers/docs/topics/gateway
*/
import type { APIChannel, APIEmoji, APIGuild, APIGuildMember, APIMessage, APIRole, APIUnavailableGuild, APIUser, GatewayActivity, GatewayPresenceUpdate as RawGatewayPresenceUpdate, GatewayVoiceState, InviteTargetUserType, PresenceUpdateStatus } from '../payloads/v6/index';
export * from './common';
/**
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare const GatewayVersion = "6";
/**
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare enum GatewayOPCodes {
Dispatch = 0,
Heartbeat = 1,
Identify = 2,
PresenceUpdate = 3,
VoiceStateUpdate = 4,
Resume = 6,
Reconnect = 7,
RequestGuildMembers = 8,
InvalidSession = 9,
Hello = 10,
HeartbeatAck = 11
}
/**
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare enum GatewayCloseCodes {
UnknownError = 4000,
UnknownOpCode = 4001,
DecodeError = 4002,
NotAuthenticated = 4003,
AuthenticationFailed = 4004,
AlreadyAuthenticated = 4005,
InvalidSeq = 4007,
RateLimited = 4008,
SessionTimedOut = 4009,
InvalidShard = 4010,
ShardingRequired = 4011,
InvalidAPIVersion = 4012,
InvalidIntents = 4013,
DisallowedIntents = 4014
}
/**
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-opcodes
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare enum VoiceOPCodes {
Identify = 0,
SelectProtocol = 1,
Ready = 2,
Heartbeat = 3,
SessionDescription = 4,
Speaking = 5,
HeartbeatAck = 6,
Resume = 7,
Hello = 8,
Resumed = 9,
ClientDisconnect = 13
}
/**
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-close-event-codes
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare enum VoiceCloseCodes {
UnknownOpCode = 4001,
NotAuthenticated = 4003,
AuthenticationFailed = 4004,
AlreadyAuthenticated = 4005,
SessionNoLongerValid = 4006,
SessionTimeout = 4009,
ServerNotFound = 4011,
UnknownProtocol = 4012,
Disconnected = 4014,
VoiceServerCrashed = 4015,
UnknownEncryptionMode = 4016
}
/**
* https://discord.com/developers/docs/topics/gateway#list-of-intents
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare enum GatewayIntentBits {
GUILDS = 1,
GUILD_MEMBERS = 2,
GUILD_BANS = 4,
GUILD_EMOJIS = 8,
GUILD_INTEGRATIONS = 16,
GUILD_WEBHOOKS = 32,
GUILD_INVITES = 64,
GUILD_VOICE_STATES = 128,
GUILD_PRESENCES = 256,
GUILD_MESSAGES = 512,
GUILD_MESSAGE_REACTIONS = 1024,
GUILD_MESSAGE_TYPING = 2048,
DIRECT_MESSAGES = 4096,
DIRECT_MESSAGE_REACTIONS = 8192,
DIRECT_MESSAGE_TYPING = 16384
}
/**
* https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare enum GatewayDispatchEvents {
Ready = "READY",
Resumed = "RESUMED",
ChannelCreate = "CHANNEL_CREATE",
ChannelUpdate = "CHANNEL_UPDATE",
ChannelDelete = "CHANNEL_DELETE",
ChannelPinsUpdate = "CHANNEL_PINS_UPDATE",
GuildCreate = "GUILD_CREATE",
GuildUpdate = "GUILD_UPDATE",
GuildDelete = "GUILD_DELETE",
GuildBanAdd = "GUILD_BAN_ADD",
GuildBanRemove = "GUILD_BAN_REMOVE",
GuildEmojisUpdate = "GUILD_EMOJIS_UPDATE",
GuildIntegrationsUpdate = "GUILD_INTEGRATIONS_UPDATE",
GuildMemberAdd = "GUILD_MEMBER_ADD",
GuildMemberRemove = "GUILD_MEMBER_REMOVE",
GuildMemberUpdate = "GUILD_MEMBER_UPDATE",
GuildMembersChunk = "GUILD_MEMBERS_CHUNK",
GuildRoleCreate = "GUILD_ROLE_CREATE",
GuildRoleUpdate = "GUILD_ROLE_UPDATE",
GuildRoleDelete = "GUILD_ROLE_DELETE",
InviteCreate = "INVITE_CREATE",
InviteDelete = "INVITE_DELETE",
MessageCreate = "MESSAGE_CREATE",
MessageUpdate = "MESSAGE_UPDATE",
MessageDelete = "MESSAGE_DELETE",
MessageDeleteBulk = "MESSAGE_DELETE_BULK",
MessageReactionAdd = "MESSAGE_REACTION_ADD",
MessageReactionRemove = "MESSAGE_REACTION_REMOVE",
MessageReactionRemoveAll = "MESSAGE_REACTION_REMOVE_ALL",
MessageReactionRemoveEmoji = "MESSAGE_REACTION_REMOVE_EMOJI",
PresenceUpdate = "PRESENCE_UPDATE",
TypingStart = "TYPING_START",
UserUpdate = "USER_UPDATE",
VoiceStateUpdate = "VOICE_STATE_UPDATE",
VoiceServerUpdate = "VOICE_SERVER_UPDATE",
WebhooksUpdate = "WEBHOOKS_UPDATE"
}
/**
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewaySendPayload = GatewayHeartbeat | GatewayIdentify | GatewayUpdatePresence | GatewayVoiceStateUpdate | GatewayResume | GatewayRequestGuildMembers;
/**
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayReceivePayload = GatewayHello | GatewayHeartbeatRequest | GatewayHeartbeatAck | GatewayInvalidSession | GatewayReconnect | GatewayDispatchPayload;
/**
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayDispatchPayload = GatewayReadyDispatch | GatewayResumedDispatch | GatewayChannelModifyDispatch | GatewayChannelPinsUpdateDispatch | GatewayGuildModifyDispatch | GatewayGuildDeleteDispatch | GatewayGuildBanModifyDispatch | GatewayGuildEmojisUpdateDispatch | GatewayGuildIntegrationsUpdateDispatch | GatewayGuildMemberAddDispatch | GatewayGuildMemberRemoveDispatch | GatewayGuildMemberUpdateDispatch | GatewayGuildMembersChunkDispatch | GatewayGuildRoleModifyDispatch | GatewayGuildRoleDeleteDispatch | GatewayInviteCreateDispatch | GatewayInviteDeleteDispatch | GatewayMessageCreateDispatch | GatewayMessageUpdateDispatch | GatewayMessageDeleteDispatch | GatewayMessageDeleteBulkDispatch | GatewayMessageReactionAddDispatch | GatewayMessageReactionRemoveDispatch | GatewayMessageReactionRemoveAllDispatch | GatewayMessageReactionRemoveEmojiDispatch | GatewayPresenceUpdateDispatch | GatewayTypingStartDispatch | GatewayUserUpdateDispatch | GatewayVoiceStateUpdateDispatch | GatewayVoiceServerUpdateDispatch | GatewayWebhooksUpdateDispatch;
/**
* https://discord.com/developers/docs/topics/gateway#hello
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export interface GatewayHello extends NonDispatchPayload {
op: GatewayOPCodes.Hello;
d: {
heartbeat_interval: number;
};
}
/**
* https://discord.com/developers/docs/topics/gateway#heartbeating
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export interface GatewayHeartbeatRequest extends NonDispatchPayload {
op: GatewayOPCodes.Heartbeat;
d: never;
}
/**
* https://discord.com/developers/docs/topics/gateway#heartbeating-example-gateway-heartbeat-ack
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export interface GatewayHeartbeatAck extends NonDispatchPayload {
op: GatewayOPCodes.HeartbeatAck;
d: never;
}
/**
* https://discord.com/developers/docs/topics/gateway#invalid-session
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export interface GatewayInvalidSession extends NonDispatchPayload {
op: GatewayOPCodes.InvalidSession;
d: boolean;
}
/**
* https://discord.com/developers/docs/topics/gateway#reconnect
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export interface GatewayReconnect extends NonDispatchPayload {
op: GatewayOPCodes.Reconnect;
d: never;
}
/**
* https://discord.com/developers/docs/topics/gateway#ready
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayReadyDispatch = DataPayload<GatewayDispatchEvents.Ready, {
v: number;
user: APIUser;
session_id: string;
private_channels: [];
guilds: APIUnavailableGuild[];
shard?: [number, number];
}>;
/**
* https://discord.com/developers/docs/topics/gateway#resumed
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayResumedDispatch = DataPayload<GatewayDispatchEvents.Resumed, never>;
/**
* https://discord.com/developers/docs/topics/gateway#channel-create
* https://discord.com/developers/docs/topics/gateway#channel-update
* https://discord.com/developers/docs/topics/gateway#channel-delete
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayChannelModifyDispatch = DataPayload<GatewayDispatchEvents.ChannelCreate | GatewayDispatchEvents.ChannelDelete | GatewayDispatchEvents.ChannelUpdate, APIChannel>;
/**
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayChannelCreateDispatch = GatewayChannelModifyDispatch;
/**
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayChannelUpdateDispatch = GatewayChannelModifyDispatch;
/**
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayChannelDeleteDispatch = GatewayChannelModifyDispatch;
/**
* https://discord.com/developers/docs/topics/gateway#channel-pins-update
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayChannelPinsUpdateDispatch = DataPayload<GatewayDispatchEvents.ChannelPinsUpdate, {
guild_id?: string;
channel_id: string;
last_pin_timestamp?: string;
}>;
/**
* https://discord.com/developers/docs/topics/gateway#guild-create
* https://discord.com/developers/docs/topics/gateway#guild-update
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayGuildModifyDispatch = DataPayload<GatewayDispatchEvents.GuildCreate | GatewayDispatchEvents.GuildUpdate, APIGuild>;
/**
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayGuildCreateDispatch = GatewayGuildModifyDispatch;
/**
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayGuildUpdateDispatch = GatewayGuildModifyDispatch;
/**
* https://discord.com/developers/docs/topics/gateway#guild-delete
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayGuildDeleteDispatch = DataPayload<GatewayDispatchEvents.GuildDelete, APIUnavailableGuild>;
/**
* https://discord.com/developers/docs/topics/gateway#guild-ban-add
* https://discord.com/developers/docs/topics/gateway#guild-ban-remove
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayGuildBanModifyDispatch = DataPayload<GatewayDispatchEvents.GuildBanAdd | GatewayDispatchEvents.GuildBanRemove, {
guild_id: string;
user: APIUser;
}>;
/**
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayGuildBanAddDispatch = GatewayGuildBanModifyDispatch;
/**
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayGuildBanRemoveDispatch = GatewayGuildBanModifyDispatch;
/**
* https://discord.com/developers/docs/topics/gateway#guild-emojis-update
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayGuildEmojisUpdateDispatch = DataPayload<GatewayDispatchEvents.GuildEmojisUpdate, {
guild_id: string;
emojis: APIEmoji[];
}>;
/**
* https://discord.com/developers/docs/topics/gateway#guild-integrations-update
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayGuildIntegrationsUpdateDispatch = DataPayload<GatewayDispatchEvents.GuildIntegrationsUpdate, {
guild_id: string;
}>;
/**
* https://discord.com/developers/docs/topics/gateway#guild-member-add
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayGuildMemberAddDispatch = DataPayload<GatewayDispatchEvents.GuildMemberAdd, APIGuildMember & {
guild_id: string;
}>;
/**
* https://discord.com/developers/docs/topics/gateway#guild-member-remove
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayGuildMemberRemoveDispatch = DataPayload<GatewayDispatchEvents.GuildMemberRemove, {
guild_id: string;
user: APIUser;
}>;
/**
* https://discord.com/developers/docs/topics/gateway#guild-member-update
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayGuildMemberUpdateDispatch = DataPayload<GatewayDispatchEvents.GuildMemberUpdate, Omit<APIGuildMember, 'deaf' | 'mute'> & {
guild_id: string;
}>;
/**
* https://discord.com/developers/docs/topics/gateway#guild-members-chunk
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayGuildMembersChunkDispatch = DataPayload<GatewayDispatchEvents.GuildMembersChunk, {
guild_id: string;
members: APIGuildMember[];
chunk_index?: number;
chunk_count?: number;
not_found?: unknown[];
presences?: RawGatewayPresenceUpdate[];
nonce?: string;
}>;
/**
* https://discord.com/developers/docs/topics/gateway#guild-role-create
* https://discord.com/developers/docs/topics/gateway#guild-role-update
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayGuildRoleModifyDispatch = DataPayload<GatewayDispatchEvents.GuildRoleCreate | GatewayDispatchEvents.GuildRoleUpdate, {
guild_id: string;
role: APIRole;
}>;
/**
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayGuildRoleCreateDispatch = GatewayGuildRoleModifyDispatch;
/**
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayGuildRoleUpdateDispatch = GatewayGuildRoleModifyDispatch;
/**
* https://discord.com/developers/docs/topics/gateway#guild-role-delete
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayGuildRoleDeleteDispatch = DataPayload<GatewayDispatchEvents.GuildRoleDelete, {
guild_id: string;
role_id: string;
}>;
/**
* https://discord.com/developers/docs/topics/gateway#invite-create
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayInviteCreateDispatch = DataPayload<GatewayDispatchEvents.InviteCreate, {
channel_id: string;
code: string;
created_at: number;
guild_id?: string;
inviter?: APIUser;
max_age: number;
max_uses: number;
target_user?: APIUser;
target_user_type?: InviteTargetUserType;
temporary: boolean;
uses: 0;
}>;
/**
* https://discord.com/developers/docs/topics/gateway#invite-delete
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayInviteDeleteDispatch = DataPayload<GatewayDispatchEvents.InviteDelete, {
channel_id: string;
guild_id?: string;
code: string;
}>;
/**
* https://discord.com/developers/docs/topics/gateway#message-create
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayMessageCreateDispatch = DataPayload<GatewayDispatchEvents.MessageCreate, APIMessage>;
/**
* https://discord.com/developers/docs/topics/gateway#message-update
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayMessageUpdateDispatch = DataPayload<GatewayDispatchEvents.MessageUpdate, {
id: string;
channel_id: string;
} & Partial<APIMessage>>;
/**
* https://discord.com/developers/docs/topics/gateway#message-delete
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayMessageDeleteDispatch = DataPayload<GatewayDispatchEvents.MessageDelete, {
id: string;
channel_id: string;
guild_id?: string;
}>;
/**
* https://discord.com/developers/docs/topics/gateway#message-delete-bulk
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayMessageDeleteBulkDispatch = DataPayload<GatewayDispatchEvents.MessageDeleteBulk, {
ids: string[];
channel_id: string;
guild_id?: string;
}>;
/**
* https://discord.com/developers/docs/topics/gateway#message-reaction-add
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayMessageReactionAddDispatch = ReactionData<GatewayDispatchEvents.MessageReactionAdd>;
/**
* https://discord.com/developers/docs/topics/gateway#message-reaction-remove
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayMessageReactionRemoveDispatch = ReactionData<GatewayDispatchEvents.MessageReactionRemove, 'member'>;
/**
* https://discord.com/developers/docs/topics/gateway#message-reaction-remove-all
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayMessageReactionRemoveAllDispatch = DataPayload<GatewayDispatchEvents.MessageReactionRemoveAll, MessageReactionRemoveData>;
/**
* https://discord.com/developers/docs/topics/gateway#message-reaction-remove-emoji
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayMessageReactionRemoveEmojiDispatch = DataPayload<GatewayDispatchEvents.MessageReactionRemoveEmoji, MessageReactionRemoveData & {
emoji: APIEmoji;
}>;
/**
* https://discord.com/developers/docs/topics/gateway#presence-update
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayPresenceUpdateDispatch = DataPayload<GatewayDispatchEvents.PresenceUpdate, RawGatewayPresenceUpdate>;
/**
* https://discord.com/developers/docs/topics/gateway#typing-start
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayTypingStartDispatch = DataPayload<GatewayDispatchEvents.TypingStart, {
channel_id: string;
guild_id?: string;
user_id: string;
timestamp: number;
member?: APIGuildMember;
}>;
/**
* https://discord.com/developers/docs/topics/gateway#user-update
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayUserUpdateDispatch = DataPayload<GatewayDispatchEvents.UserUpdate, APIUser>;
/**
* https://discord.com/developers/docs/topics/gateway#voice-state-update
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayVoiceStateUpdateDispatch = DataPayload<GatewayDispatchEvents.VoiceStateUpdate, GatewayVoiceState>;
/**
* https://discord.com/developers/docs/topics/gateway#voice-server-update
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayVoiceServerUpdateDispatch = DataPayload<GatewayDispatchEvents.VoiceServerUpdate, {
token: string;
guild_id: string;
endpoint: string;
}>;
/**
* https://discord.com/developers/docs/topics/gateway#webhooks-update
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export declare type GatewayWebhooksUpdateDispatch = DataPayload<GatewayDispatchEvents.WebhooksUpdate, {
guild_id: string;
channel_id: string;
}>;
/**
* https://discord.com/developers/docs/topics/gateway#heartbeating
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export interface GatewayHeartbeat {
op: GatewayOPCodes.Heartbeat;
d: number;
}
/**
* https://discord.com/developers/docs/topics/gateway#identify-identify-connection-properties
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export interface GatewayIdentifyProperties {
$os: string;
$browser: string;
$device: string;
}
/**
* https://discord.com/developers/docs/topics/gateway#identify
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export interface GatewayIdentify {
op: GatewayOPCodes.Identify;
d: {
token: string;
properties: GatewayIdentifyProperties;
compress?: boolean;
large_threshold?: number;
shard?: [shard_id: number, shard_count: number];
presence?: RawGatewayPresenceUpdate;
guild_subscriptions?: boolean;
intents?: number;
};
}
/**
* https://discord.com/developers/docs/topics/gateway#resume
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export interface GatewayResume {
op: GatewayOPCodes.Resume;
d: {
token: string;
session_id: string;
seq: number;
};
}
/**
* https://discord.com/developers/docs/topics/gateway#request-guild-members
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export interface GatewayRequestGuildMembers {
op: GatewayOPCodes.RequestGuildMembers;
d: {
guild_id: string | string[];
query?: string;
limit: number;
presences?: boolean;
user_ids?: string | string[];
nonce?: string;
};
}
/**
* https://discord.com/developers/docs/topics/gateway#update-voice-state
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export interface GatewayVoiceStateUpdate {
op: GatewayOPCodes.VoiceStateUpdate;
d: {
guild_id: string;
channel_id: string | null;
self_mute: boolean;
self_deaf: boolean;
};
}
/**
* https://discord.com/developers/docs/topics/gateway#update-status
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export interface GatewayUpdatePresence {
op: GatewayOPCodes.PresenceUpdate;
d: GatewayPresenceUpdateData;
}
/**
* https://discord.com/developers/docs/topics/gateway#update-status-gateway-status-update-structure
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
export interface GatewayPresenceUpdateData {
since: number | null;
game: GatewayActivity | null;
status: PresenceUpdateStatus;
afk: boolean;
}
/**
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
interface BasePayload {
op: GatewayOPCodes;
s: number;
d?: unknown;
t?: string;
}
/**
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
declare type NonDispatchPayload = Omit<BasePayload, 't'>;
/**
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
interface DataPayload<Event extends GatewayDispatchEvents, D = unknown> extends BasePayload {
op: GatewayOPCodes.Dispatch;
t: Event;
d: D;
}
/**
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
declare type ReactionData<E extends GatewayDispatchEvents, O extends string = never> = DataPayload<E, Omit<{
user_id: string;
channel_id: string;
message_id: string;
guild_id?: string;
member?: APIGuildMember;
emoji: APIEmoji;
}, O>>;
/**
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
interface MessageReactionRemoveData {
channel_id: string;
message_id: string;
guild_id?: string;
}
//# sourceMappingURL=v6.d.ts.map
@@ -1 +0,0 @@
{"version":3,"file":"v6.d.ts","sourceRoot":"","sources":["v6.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACX,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,cAAc,EACd,UAAU,EACV,OAAO,EACP,mBAAmB,EACnB,OAAO,EACP,eAAe,EACf,qBAAqB,IAAI,wBAAwB,EACjD,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACpB,MAAM,sBAAsB,CAAC;AAE9B,cAAc,UAAU,CAAC;AAEzB;;GAEG;AACH,eAAO,MAAM,cAAc,MAAM,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B,GAAG,WAAW,CACtD,qBAAqB,CAAC,WAAW,GAAG,qBAAqB,CAAC,cAAc,EACxE;IACC,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;CACd,CACD,CAAC;AAEF;;GAEG;AACH,oBAAY,0BAA0B,GAAG,6BAA6B,CAAC;AAEvE;;GAEG;AACH,oBAAY,6BAA6B,GAAG,6BAA6B,CAAC;AAE1E;;;GAGG;AACH,oBAAY,gCAAgC,GAAG,WAAW,CACzD,qBAAqB,CAAC,iBAAiB,EACvC;IACC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,QAAQ,EAAE,CAAC;CACnB,CACD,CAAC;AAEF;;;GAGG;AACH,oBAAY,Line truncated
@@ -1,163 +0,0 @@
"use strict";
/**
* Types extracted from https://discord.com/developers/docs/topics/gateway
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.GatewayDispatchEvents = exports.GatewayIntentBits = exports.VoiceCloseCodes = exports.VoiceOPCodes = exports.GatewayCloseCodes = exports.GatewayOPCodes = exports.GatewayVersion = void 0;
__exportStar(require("./common"), exports);
/**
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
exports.GatewayVersion = '6';
/**
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
var GatewayOPCodes;
(function (GatewayOPCodes) {
GatewayOPCodes[GatewayOPCodes["Dispatch"] = 0] = "Dispatch";
GatewayOPCodes[GatewayOPCodes["Heartbeat"] = 1] = "Heartbeat";
GatewayOPCodes[GatewayOPCodes["Identify"] = 2] = "Identify";
GatewayOPCodes[GatewayOPCodes["PresenceUpdate"] = 3] = "PresenceUpdate";
GatewayOPCodes[GatewayOPCodes["VoiceStateUpdate"] = 4] = "VoiceStateUpdate";
GatewayOPCodes[GatewayOPCodes["Resume"] = 6] = "Resume";
GatewayOPCodes[GatewayOPCodes["Reconnect"] = 7] = "Reconnect";
GatewayOPCodes[GatewayOPCodes["RequestGuildMembers"] = 8] = "RequestGuildMembers";
GatewayOPCodes[GatewayOPCodes["InvalidSession"] = 9] = "InvalidSession";
GatewayOPCodes[GatewayOPCodes["Hello"] = 10] = "Hello";
GatewayOPCodes[GatewayOPCodes["HeartbeatAck"] = 11] = "HeartbeatAck";
})(GatewayOPCodes = exports.GatewayOPCodes || (exports.GatewayOPCodes = {}));
/**
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
var GatewayCloseCodes;
(function (GatewayCloseCodes) {
GatewayCloseCodes[GatewayCloseCodes["UnknownError"] = 4000] = "UnknownError";
GatewayCloseCodes[GatewayCloseCodes["UnknownOpCode"] = 4001] = "UnknownOpCode";
GatewayCloseCodes[GatewayCloseCodes["DecodeError"] = 4002] = "DecodeError";
GatewayCloseCodes[GatewayCloseCodes["NotAuthenticated"] = 4003] = "NotAuthenticated";
GatewayCloseCodes[GatewayCloseCodes["AuthenticationFailed"] = 4004] = "AuthenticationFailed";
GatewayCloseCodes[GatewayCloseCodes["AlreadyAuthenticated"] = 4005] = "AlreadyAuthenticated";
GatewayCloseCodes[GatewayCloseCodes["InvalidSeq"] = 4007] = "InvalidSeq";
GatewayCloseCodes[GatewayCloseCodes["RateLimited"] = 4008] = "RateLimited";
GatewayCloseCodes[GatewayCloseCodes["SessionTimedOut"] = 4009] = "SessionTimedOut";
GatewayCloseCodes[GatewayCloseCodes["InvalidShard"] = 4010] = "InvalidShard";
GatewayCloseCodes[GatewayCloseCodes["ShardingRequired"] = 4011] = "ShardingRequired";
GatewayCloseCodes[GatewayCloseCodes["InvalidAPIVersion"] = 4012] = "InvalidAPIVersion";
GatewayCloseCodes[GatewayCloseCodes["InvalidIntents"] = 4013] = "InvalidIntents";
GatewayCloseCodes[GatewayCloseCodes["DisallowedIntents"] = 4014] = "DisallowedIntents";
})(GatewayCloseCodes = exports.GatewayCloseCodes || (exports.GatewayCloseCodes = {}));
/**
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-opcodes
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
var VoiceOPCodes;
(function (VoiceOPCodes) {
VoiceOPCodes[VoiceOPCodes["Identify"] = 0] = "Identify";
VoiceOPCodes[VoiceOPCodes["SelectProtocol"] = 1] = "SelectProtocol";
VoiceOPCodes[VoiceOPCodes["Ready"] = 2] = "Ready";
VoiceOPCodes[VoiceOPCodes["Heartbeat"] = 3] = "Heartbeat";
VoiceOPCodes[VoiceOPCodes["SessionDescription"] = 4] = "SessionDescription";
VoiceOPCodes[VoiceOPCodes["Speaking"] = 5] = "Speaking";
VoiceOPCodes[VoiceOPCodes["HeartbeatAck"] = 6] = "HeartbeatAck";
VoiceOPCodes[VoiceOPCodes["Resume"] = 7] = "Resume";
VoiceOPCodes[VoiceOPCodes["Hello"] = 8] = "Hello";
VoiceOPCodes[VoiceOPCodes["Resumed"] = 9] = "Resumed";
VoiceOPCodes[VoiceOPCodes["ClientDisconnect"] = 13] = "ClientDisconnect";
})(VoiceOPCodes = exports.VoiceOPCodes || (exports.VoiceOPCodes = {}));
/**
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-close-event-codes
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
var VoiceCloseCodes;
(function (VoiceCloseCodes) {
VoiceCloseCodes[VoiceCloseCodes["UnknownOpCode"] = 4001] = "UnknownOpCode";
VoiceCloseCodes[VoiceCloseCodes["NotAuthenticated"] = 4003] = "NotAuthenticated";
VoiceCloseCodes[VoiceCloseCodes["AuthenticationFailed"] = 4004] = "AuthenticationFailed";
VoiceCloseCodes[VoiceCloseCodes["AlreadyAuthenticated"] = 4005] = "AlreadyAuthenticated";
VoiceCloseCodes[VoiceCloseCodes["SessionNoLongerValid"] = 4006] = "SessionNoLongerValid";
VoiceCloseCodes[VoiceCloseCodes["SessionTimeout"] = 4009] = "SessionTimeout";
VoiceCloseCodes[VoiceCloseCodes["ServerNotFound"] = 4011] = "ServerNotFound";
VoiceCloseCodes[VoiceCloseCodes["UnknownProtocol"] = 4012] = "UnknownProtocol";
VoiceCloseCodes[VoiceCloseCodes["Disconnected"] = 4014] = "Disconnected";
VoiceCloseCodes[VoiceCloseCodes["VoiceServerCrashed"] = 4015] = "VoiceServerCrashed";
VoiceCloseCodes[VoiceCloseCodes["UnknownEncryptionMode"] = 4016] = "UnknownEncryptionMode";
})(VoiceCloseCodes = exports.VoiceCloseCodes || (exports.VoiceCloseCodes = {}));
/**
* https://discord.com/developers/docs/topics/gateway#list-of-intents
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
var GatewayIntentBits;
(function (GatewayIntentBits) {
GatewayIntentBits[GatewayIntentBits["GUILDS"] = 1] = "GUILDS";
GatewayIntentBits[GatewayIntentBits["GUILD_MEMBERS"] = 2] = "GUILD_MEMBERS";
GatewayIntentBits[GatewayIntentBits["GUILD_BANS"] = 4] = "GUILD_BANS";
GatewayIntentBits[GatewayIntentBits["GUILD_EMOJIS"] = 8] = "GUILD_EMOJIS";
GatewayIntentBits[GatewayIntentBits["GUILD_INTEGRATIONS"] = 16] = "GUILD_INTEGRATIONS";
GatewayIntentBits[GatewayIntentBits["GUILD_WEBHOOKS"] = 32] = "GUILD_WEBHOOKS";
GatewayIntentBits[GatewayIntentBits["GUILD_INVITES"] = 64] = "GUILD_INVITES";
GatewayIntentBits[GatewayIntentBits["GUILD_VOICE_STATES"] = 128] = "GUILD_VOICE_STATES";
GatewayIntentBits[GatewayIntentBits["GUILD_PRESENCES"] = 256] = "GUILD_PRESENCES";
GatewayIntentBits[GatewayIntentBits["GUILD_MESSAGES"] = 512] = "GUILD_MESSAGES";
GatewayIntentBits[GatewayIntentBits["GUILD_MESSAGE_REACTIONS"] = 1024] = "GUILD_MESSAGE_REACTIONS";
GatewayIntentBits[GatewayIntentBits["GUILD_MESSAGE_TYPING"] = 2048] = "GUILD_MESSAGE_TYPING";
GatewayIntentBits[GatewayIntentBits["DIRECT_MESSAGES"] = 4096] = "DIRECT_MESSAGES";
GatewayIntentBits[GatewayIntentBits["DIRECT_MESSAGE_REACTIONS"] = 8192] = "DIRECT_MESSAGE_REACTIONS";
GatewayIntentBits[GatewayIntentBits["DIRECT_MESSAGE_TYPING"] = 16384] = "DIRECT_MESSAGE_TYPING";
})(GatewayIntentBits = exports.GatewayIntentBits || (exports.GatewayIntentBits = {}));
/**
* https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/
var GatewayDispatchEvents;
(function (GatewayDispatchEvents) {
GatewayDispatchEvents["Ready"] = "READY";
GatewayDispatchEvents["Resumed"] = "RESUMED";
GatewayDispatchEvents["ChannelCreate"] = "CHANNEL_CREATE";
GatewayDispatchEvents["ChannelUpdate"] = "CHANNEL_UPDATE";
GatewayDispatchEvents["ChannelDelete"] = "CHANNEL_DELETE";
GatewayDispatchEvents["ChannelPinsUpdate"] = "CHANNEL_PINS_UPDATE";
GatewayDispatchEvents["GuildCreate"] = "GUILD_CREATE";
GatewayDispatchEvents["GuildUpdate"] = "GUILD_UPDATE";
GatewayDispatchEvents["GuildDelete"] = "GUILD_DELETE";
GatewayDispatchEvents["GuildBanAdd"] = "GUILD_BAN_ADD";
GatewayDispatchEvents["GuildBanRemove"] = "GUILD_BAN_REMOVE";
GatewayDispatchEvents["GuildEmojisUpdate"] = "GUILD_EMOJIS_UPDATE";
GatewayDispatchEvents["GuildIntegrationsUpdate"] = "GUILD_INTEGRATIONS_UPDATE";
GatewayDispatchEvents["GuildMemberAdd"] = "GUILD_MEMBER_ADD";
GatewayDispatchEvents["GuildMemberRemove"] = "GUILD_MEMBER_REMOVE";
GatewayDispatchEvents["GuildMemberUpdate"] = "GUILD_MEMBER_UPDATE";
GatewayDispatchEvents["GuildMembersChunk"] = "GUILD_MEMBERS_CHUNK";
GatewayDispatchEvents["GuildRoleCreate"] = "GUILD_ROLE_CREATE";
GatewayDispatchEvents["GuildRoleUpdate"] = "GUILD_ROLE_UPDATE";
GatewayDispatchEvents["GuildRoleDelete"] = "GUILD_ROLE_DELETE";
GatewayDispatchEvents["InviteCreate"] = "INVITE_CREATE";
GatewayDispatchEvents["InviteDelete"] = "INVITE_DELETE";
GatewayDispatchEvents["MessageCreate"] = "MESSAGE_CREATE";
GatewayDispatchEvents["MessageUpdate"] = "MESSAGE_UPDATE";
GatewayDispatchEvents["MessageDelete"] = "MESSAGE_DELETE";
GatewayDispatchEvents["MessageDeleteBulk"] = "MESSAGE_DELETE_BULK";
GatewayDispatchEvents["MessageReactionAdd"] = "MESSAGE_REACTION_ADD";
GatewayDispatchEvents["MessageReactionRemove"] = "MESSAGE_REACTION_REMOVE";
GatewayDispatchEvents["MessageReactionRemoveAll"] = "MESSAGE_REACTION_REMOVE_ALL";
GatewayDispatchEvents["MessageReactionRemoveEmoji"] = "MESSAGE_REACTION_REMOVE_EMOJI";
GatewayDispatchEvents["PresenceUpdate"] = "PRESENCE_UPDATE";
GatewayDispatchEvents["TypingStart"] = "TYPING_START";
GatewayDispatchEvents["UserUpdate"] = "USER_UPDATE";
GatewayDispatchEvents["VoiceStateUpdate"] = "VOICE_STATE_UPDATE";
GatewayDispatchEvents["VoiceServerUpdate"] = "VOICE_SERVER_UPDATE";
GatewayDispatchEvents["WebhooksUpdate"] = "WEBHOOKS_UPDATE";
})(GatewayDispatchEvents = exports.GatewayDispatchEvents || (exports.GatewayDispatchEvents = {}));
// #endregion Shared
//# sourceMappingURL=v6.js.map
@@ -1 +0,0 @@
{"version":3,"file":"v6.js","sourceRoot":"","sources":["v6.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;AAkBH,2CAAyB;AAEzB;;GAEG;AACU,QAAA,cAAc,GAAG,GAAG,CAAC;AAElC;;;GAGG;AACH,IAAY,cAaX;AAbD,WAAY,cAAc;IACzB,2DAAQ,CAAA;IACR,6DAAS,CAAA;IACT,2DAAQ,CAAA;IACR,uEAAc,CAAA;IACd,2EAAgB,CAAA;IAEhB,uDAAU,CAAA;IACV,6DAAS,CAAA;IACT,iFAAmB,CAAA;IACnB,uEAAc,CAAA;IACd,sDAAK,CAAA;IACL,oEAAY,CAAA;AACb,CAAC,EAbW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAazB;AAED;;;GAGG;AACH,IAAY,iBAgBX;AAhBD,WAAY,iBAAiB;IAC5B,4EAAmB,CAAA;IACnB,8EAAa,CAAA;IACb,0EAAW,CAAA;IACX,oFAAgB,CAAA;IAChB,4FAAoB,CAAA;IACpB,4FAAoB,CAAA;IAEpB,wEAAiB,CAAA;IACjB,0EAAW,CAAA;IACX,kFAAe,CAAA;IACf,4EAAY,CAAA;IACZ,oFAAgB,CAAA;IAChB,sFAAiB,CAAA;IACjB,gFAAc,CAAA;IACd,sFAAiB,CAAA;AAClB,CAAC,EAhBW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAgB5B;AAED;;;GAGG;AACH,IAAY,YAaX;AAbD,WAAY,YAAY;IACvB,uDAAQ,CAAA;IACR,mEAAc,CAAA;IACd,iDAAK,CAAA;IACL,yDAAS,CAAA;IACT,2EAAkB,CAAA;IAClB,uDAAQ,CAAA;IACR,+DAAY,CAAA;IACZ,mDAAM,CAAA;IACN,iDAAK,CAAA;IACL,qDAAO,CAAA;IAEP,wEAAqB,CAAA;AACtB,CAAC,EAbW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAavB;AAED;;;G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DAA8B,CAAA;IAC9B,uDAA8B,CAAA;IAC9B,yDAAgC,CAAA;IAChC,yDAAgC,CAAA;IAChC,yDAAgC,CAAA;IAChC,kEAAyC,CAAA;IACzC,oEAA2C,CAAA;IAC3C,0EAAiD,CAAA;IACjD,iFAAwD,CAAA;IACxD,qFAA4D,CAAA;IAC5D,2DAAkC,CAAA;IAClC,qDAA4B,CAAA;IAC5B,mDAA0B,CAAA;IAC1B,gEAAuC,CAAA;IACvC,kEAAyC,CAAA;IACzC,2DAAkC,CAAA;AACnC,CAAC,EArCW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAqChC;AAwoBD,oBAAoB"}
@@ -1,10 +0,0 @@
import mod from "./v6.js";
export default mod;
export const GatewayCloseCodes = mod.GatewayCloseCodes;
export const GatewayDispatchEvents = mod.GatewayDispatchEvents;
export const GatewayIntentBits = mod.GatewayIntentBits;
export const GatewayOPCodes = mod.GatewayOPCodes;
export const GatewayVersion = mod.GatewayVersion;
export const VoiceCloseCodes = mod.VoiceCloseCodes;
export const VoiceOPCodes = mod.VoiceOPCodes;
File diff suppressed because it is too large. Load diff
@@ -1 +0,0 @@
{"version":3,"file":"v8.d.ts","sourceRoot":"","sources":["v8.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,KAAK,EACX,cAAc,EACd,qBAAqB,EACrB,gCAAgC,EAChC,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,mBAAmB,EACnB,cAAc,EACd,UAAU,EACV,8BAA8B,EAC9B,OAAO,EACP,gBAAgB,EAChB,UAAU,EACV,mBAAmB,EACnB,OAAO,EACP,eAAe,EACf,qBAAqB,IAAI,wBAAwB,EACjD,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD,cAAc,UAAU,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;;;OAIG;IACH,WAAW,EAAE,IAAI,CAAC,cAAc,EAAE,IAAI,GAAG,OAAO,CAAC,CAAC;CAClD;AAED;;GAEG;AACH,oBAAY,sBAAsB,GAAG,WAAW,CAAC,qBAAqB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AAEvF;;;;GAIG;AACH,oBAAY,4BAA4B,GAAG,WAAW,CACrD,qBAAqB,CAAC,aAAa,GAAG,qBAAqB,CAAC,aAAaLine truncated
@@ -1,228 +0,0 @@
"use strict";
/**
* Types extracted from https://discord.com/developers/docs/topics/gateway
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.GatewayDispatchEvents = exports.GatewayIntentBits = exports.GatewayCloseCodes = exports.GatewayOpcodes = exports.GatewayVersion = void 0;
__exportStar(require("./common"), exports);
exports.GatewayVersion = '8';
/**
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes
*/
var GatewayOpcodes;
(function (GatewayOpcodes) {
/**
* An event was dispatched
*/
GatewayOpcodes[GatewayOpcodes["Dispatch"] = 0] = "Dispatch";
/**
* A bidirectional opcode to maintain an active gateway connection.
* Fired periodically by the client, or fired by the gateway to request an immediate heartbeat from the client.
*/
GatewayOpcodes[GatewayOpcodes["Heartbeat"] = 1] = "Heartbeat";
/**
* Starts a new session during the initial handshake
*/
GatewayOpcodes[GatewayOpcodes["Identify"] = 2] = "Identify";
/**
* Update the client's presence
*/
GatewayOpcodes[GatewayOpcodes["PresenceUpdate"] = 3] = "PresenceUpdate";
/**
* Used to join/leave or move between voice channels
*/
GatewayOpcodes[GatewayOpcodes["VoiceStateUpdate"] = 4] = "VoiceStateUpdate";
/**
* Resume a previous session that was disconnected
*/
GatewayOpcodes[GatewayOpcodes["Resume"] = 6] = "Resume";
/**
* You should attempt to reconnect and resume immediately
*/
GatewayOpcodes[GatewayOpcodes["Reconnect"] = 7] = "Reconnect";
/**
* Request information about offline guild members in a large guild
*/
GatewayOpcodes[GatewayOpcodes["RequestGuildMembers"] = 8] = "RequestGuildMembers";
/**
* The session has been invalidated. You should reconnect and identify/resume accordingly
*/
GatewayOpcodes[GatewayOpcodes["InvalidSession"] = 9] = "InvalidSession";
/**
* Sent immediately after connecting, contains the `heartbeat_interval` to use
*/
GatewayOpcodes[GatewayOpcodes["Hello"] = 10] = "Hello";
/**
* Sent in response to receiving a heartbeat to acknowledge that it has been received
*/
GatewayOpcodes[GatewayOpcodes["HeartbeatAck"] = 11] = "HeartbeatAck";
})(GatewayOpcodes = exports.GatewayOpcodes || (exports.GatewayOpcodes = {}));
/**
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes
*/
var GatewayCloseCodes;
(function (GatewayCloseCodes) {
/**
* We're not sure what went wrong. Try reconnecting?
*/
GatewayCloseCodes[GatewayCloseCodes["UnknownError"] = 4000] = "UnknownError";
/**
* You sent an invalid Gateway opcode or an invalid payload for an opcode. Don't do that!
*
* See https://discord.com/developers/docs/topics/gateway#payloads-and-opcodes
*/
GatewayCloseCodes[GatewayCloseCodes["UnknownOpcode"] = 4001] = "UnknownOpcode";
/**
* You sent an invalid payload to us. Don't do that!
*
* See https://discord.com/developers/docs/topics/gateway#sending-payloads
*/
GatewayCloseCodes[GatewayCloseCodes["DecodeError"] = 4002] = "DecodeError";
/**
* You sent us a payload prior to identifying
*
* See https://discord.com/developers/docs/topics/gateway#identify
*/
GatewayCloseCodes[GatewayCloseCodes["NotAuthenticated"] = 4003] = "NotAuthenticated";
/**
* The account token sent with your identify payload is incorrect
*
* See https://discord.com/developers/docs/topics/gateway#identify
*/
GatewayCloseCodes[GatewayCloseCodes["AuthenticationFailed"] = 4004] = "AuthenticationFailed";
/**
* You sent more than one identify payload. Don't do that!
*/
GatewayCloseCodes[GatewayCloseCodes["AlreadyAuthenticated"] = 4005] = "AlreadyAuthenticated";
/**
* The sequence sent when resuming the session was invalid. Reconnect and start a new session
*
* See https://discord.com/developers/docs/topics/gateway#resume
*/
GatewayCloseCodes[GatewayCloseCodes["InvalidSeq"] = 4007] = "InvalidSeq";
/**
* Woah nelly! You're sending payloads to us too quickly. Slow it down! You will be disconnected on receiving this
*/
GatewayCloseCodes[GatewayCloseCodes["RateLimited"] = 4008] = "RateLimited";
/**
* Your session timed out. Reconnect and start a new one
*/
GatewayCloseCodes[GatewayCloseCodes["SessionTimedOut"] = 4009] = "SessionTimedOut";
/**
* You sent us an invalid shard when identifying
*
* See https://discord.com/developers/docs/topics/gateway#sharding
*/
GatewayCloseCodes[GatewayCloseCodes["InvalidShard"] = 4010] = "InvalidShard";
/**
* The session would have handled too many guilds - you are required to shard your connection in order to connect
*
* See https://discord.com/developers/docs/topics/gateway#sharding
*/
GatewayCloseCodes[GatewayCloseCodes["ShardingRequired"] = 4011] = "ShardingRequired";
/**
* You sent an invalid version for the gateway
*/
GatewayCloseCodes[GatewayCloseCodes["InvalidAPIVersion"] = 4012] = "InvalidAPIVersion";
/**
* You sent an invalid intent for a Gateway Intent. You may have incorrectly calculated the bitwise value
*
* See https://discord.com/developers/docs/topics/gateway#gateway-intents
*/
GatewayCloseCodes[GatewayCloseCodes["InvalidIntents"] = 4013] = "InvalidIntents";
/**
* You sent a disallowed intent for a Gateway Intent. You may have tried to specify an intent that you have not
* enabled or are not whitelisted for
*
* See https://discord.com/developers/docs/topics/gateway#gateway-intents
*
* See https://discord.com/developers/docs/topics/gateway#privileged-intents
*/
GatewayCloseCodes[GatewayCloseCodes["DisallowedIntents"] = 4014] = "DisallowedIntents";
})(GatewayCloseCodes = exports.GatewayCloseCodes || (exports.GatewayCloseCodes = {}));
/**
* https://discord.com/developers/docs/topics/gateway#list-of-intents
*/
var GatewayIntentBits;
(function (GatewayIntentBits) {
GatewayIntentBits[GatewayIntentBits["Guilds"] = 1] = "Guilds";
GatewayIntentBits[GatewayIntentBits["GuildMembers"] = 2] = "GuildMembers";
GatewayIntentBits[GatewayIntentBits["GuildBans"] = 4] = "GuildBans";
GatewayIntentBits[GatewayIntentBits["GuildEmojisAndStickers"] = 8] = "GuildEmojisAndStickers";
GatewayIntentBits[GatewayIntentBits["GuildIntegrations"] = 16] = "GuildIntegrations";
GatewayIntentBits[GatewayIntentBits["GuildWebhooks"] = 32] = "GuildWebhooks";
GatewayIntentBits[GatewayIntentBits["GuildInvites"] = 64] = "GuildInvites";
GatewayIntentBits[GatewayIntentBits["GuildVoiceStates"] = 128] = "GuildVoiceStates";
GatewayIntentBits[GatewayIntentBits["GuildPresences"] = 256] = "GuildPresences";
GatewayIntentBits[GatewayIntentBits["GuildMessages"] = 512] = "GuildMessages";
GatewayIntentBits[GatewayIntentBits["GuildMessageReactions"] = 1024] = "GuildMessageReactions";
GatewayIntentBits[GatewayIntentBits["GuildMessageTyping"] = 2048] = "GuildMessageTyping";
GatewayIntentBits[GatewayIntentBits["DirectMessages"] = 4096] = "DirectMessages";
GatewayIntentBits[GatewayIntentBits["DirectMessageReactions"] = 8192] = "DirectMessageReactions";
GatewayIntentBits[GatewayIntentBits["DirectMessageTyping"] = 16384] = "DirectMessageTyping";
})(GatewayIntentBits = exports.GatewayIntentBits || (exports.GatewayIntentBits = {}));
/**
* https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events
*/
var GatewayDispatchEvents;
(function (GatewayDispatchEvents) {
GatewayDispatchEvents["ApplicationCommandCreate"] = "APPLICATION_COMMAND_CREATE";
GatewayDispatchEvents["ApplicationCommandDelete"] = "APPLICATION_COMMAND_DELETE";
GatewayDispatchEvents["ApplicationCommandUpdate"] = "APPLICATION_COMMAND_UPDATE";
GatewayDispatchEvents["ChannelCreate"] = "CHANNEL_CREATE";
GatewayDispatchEvents["ChannelDelete"] = "CHANNEL_DELETE";
GatewayDispatchEvents["ChannelPinsUpdate"] = "CHANNEL_PINS_UPDATE";
GatewayDispatchEvents["ChannelUpdate"] = "CHANNEL_UPDATE";
GatewayDispatchEvents["GuildBanAdd"] = "GUILD_BAN_ADD";
GatewayDispatchEvents["GuildBanRemove"] = "GUILD_BAN_REMOVE";
GatewayDispatchEvents["GuildCreate"] = "GUILD_CREATE";
GatewayDispatchEvents["GuildDelete"] = "GUILD_DELETE";
GatewayDispatchEvents["GuildEmojisUpdate"] = "GUILD_EMOJIS_UPDATE";
GatewayDispatchEvents["GuildIntegrationsUpdate"] = "GUILD_INTEGRATIONS_UPDATE";
GatewayDispatchEvents["GuildMemberAdd"] = "GUILD_MEMBER_ADD";
GatewayDispatchEvents["GuildMemberRemove"] = "GUILD_MEMBER_REMOVE";
GatewayDispatchEvents["GuildMembersChunk"] = "GUILD_MEMBERS_CHUNK";
GatewayDispatchEvents["GuildMemberUpdate"] = "GUILD_MEMBER_UPDATE";
GatewayDispatchEvents["GuildRoleCreate"] = "GUILD_ROLE_CREATE";
GatewayDispatchEvents["GuildRoleDelete"] = "GUILD_ROLE_DELETE";
GatewayDispatchEvents["GuildRoleUpdate"] = "GUILD_ROLE_UPDATE";
GatewayDispatchEvents["GuildStickersUpdate"] = "GUILD_STICKERS_UPDATE";
GatewayDispatchEvents["GuildUpdate"] = "GUILD_UPDATE";
GatewayDispatchEvents["IntegrationCreate"] = "INTEGRATION_CREATE";
GatewayDispatchEvents["IntegrationDelete"] = "INTEGRATION_DELETE";
GatewayDispatchEvents["IntegrationUpdate"] = "INTEGRATION_UPDATE";
GatewayDispatchEvents["InteractionCreate"] = "INTERACTION_CREATE";
GatewayDispatchEvents["InviteCreate"] = "INVITE_CREATE";
GatewayDispatchEvents["InviteDelete"] = "INVITE_DELETE";
GatewayDispatchEvents["MessageCreate"] = "MESSAGE_CREATE";
GatewayDispatchEvents["MessageDelete"] = "MESSAGE_DELETE";
GatewayDispatchEvents["MessageDeleteBulk"] = "MESSAGE_DELETE_BULK";
GatewayDispatchEvents["MessageReactionAdd"] = "MESSAGE_REACTION_ADD";
GatewayDispatchEvents["MessageReactionRemove"] = "MESSAGE_REACTION_REMOVE";
GatewayDispatchEvents["MessageReactionRemoveAll"] = "MESSAGE_REACTION_REMOVE_ALL";
GatewayDispatchEvents["MessageReactionRemoveEmoji"] = "MESSAGE_REACTION_REMOVE_EMOJI";
GatewayDispatchEvents["MessageUpdate"] = "MESSAGE_UPDATE";
GatewayDispatchEvents["PresenceUpdate"] = "PRESENCE_UPDATE";
GatewayDispatchEvents["StageInstanceCreate"] = "STAGE_INSTANCE_CREATE";
GatewayDispatchEvents["StageInstanceDelete"] = "STAGE_INSTANCE_DELETE";
GatewayDispatchEvents["StageInstanceUpdate"] = "STAGE_INSTANCE_UPDATE";
GatewayDispatchEvents["Ready"] = "READY";
GatewayDispatchEvents["Resumed"] = "RESUMED";
GatewayDispatchEvents["TypingStart"] = "TYPING_START";
GatewayDispatchEvents["UserUpdate"] = "USER_UPDATE";
GatewayDispatchEvents["VoiceServerUpdate"] = "VOICE_SERVER_UPDATE";
GatewayDispatchEvents["VoiceStateUpdate"] = "VOICE_STATE_UPDATE";
GatewayDispatchEvents["WebhooksUpdate"] = "WEBHOOKS_UPDATE";
})(GatewayDispatchEvents = exports.GatewayDispatchEvents || (exports.GatewayDispatchEvents = {}));
// #endregion Shared
//# sourceMappingURL=v8.js.map
@@ -1 +0,0 @@
{"version":3,"file":"v8.js","sourceRoot":"","sources":["v8.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;AA2BH,2CAAyB;AAEZ,QAAA,cAAc,GAAG,GAAG,CAAC;AAElC;;GAEG;AACH,IAAkB,cA8CjB;AA9CD,WAAkB,cAAc;IAC/B;;OAEG;IACH,2DAAQ,CAAA;IACR;;;OAGG;IACH,6DAAS,CAAA;IACT;;OAEG;IACH,2DAAQ,CAAA;IACR;;OAEG;I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8.js";
export default mod;
export const GatewayCloseCodes = mod.GatewayCloseCodes;
export const GatewayDispatchEvents = mod.GatewayDispatchEvents;
export const GatewayIntentBits = mod.GatewayIntentBits;
export const GatewayOpcodes = mod.GatewayOpcodes;
export const GatewayVersion = mod.GatewayVersion;
File diff suppressed because it is too large. Load diff
@@ -1 +0,0 @@
{"version":3,"file":"v9.d.ts","sourceRoot":"","sources":["v9.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,KAAK,EACX,cAAc,EACd,qBAAqB,EACrB,gCAAgC,EAChC,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,mBAAmB,EACnB,cAAc,EACd,UAAU,EACV,8BAA8B,EAC9B,OAAO,EACP,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,mBAAmB,EACnB,OAAO,EACP,eAAe,EACf,qBAAqB,IAAI,wBAAwB,EACjD,qBAAqB,IAAI,wBAAwB,EACjD,0BAA0B,IAAI,6BAA6B,EAC3D,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD,cAAc,UAAU,CAAC;AAEzB,eAAO,MAAM,cAAc,MAAM,CAAC;AAElC;;GAEG;AACH,0BAAkB,cAAc;IAC/B;;OAEG;IACH,QAAQ,IAAA;IACR;;;OAGG;IACH,SAAS,IAAA;IACT;;OAEG;IACH,QAAQ,IAAA;IACR;;OAEG;IACH,cAAc,IAAA;IACd;;OAEG;IACH,gBAAgB,IAAA;IAChB;;OAEG;IACH,MAAM,IAAI;IACV;;OAEG;IACH,SAAS,IAAA;IACT;;OAEG;IACH,mBAAmB,IAAA;IACnB;;OAEG;IACH,cAAc,IAAA;IACd;;OAEG;IACH,KAAK,KAAA;IACL;;OAEG;IACH,YAAY,KAAA;CACZ;AAED;;GAEG;AACH,0B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,EAAE,EAAE,cAAc,CAAC,SAAS,CAAC;IAC7B,CAAC,EAAE,KAAK,CAAC;CACT;AAED;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,kBAAkB;IAC9D,EAAE,EAAE,cAAc,CAAC,YAAY,CAAC;IAChC,CAAC,EAAE,KAAK,CAAC;CACT;AAED;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,kBAAkB;IAChE,EAAE,EAAE,cAAc,CAAC,cAAc,CAAC;IAClC,CAAC,EAAE,yBAAyB,CAAC;CAC7B;AAED;;GAEG;AACH,oBAAY,yBAAyB,GAAG,OAAO,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,kBAAkB;IAC3D,EAAE,EAAE,cAAc,CAAC,SAAS,CAAC;IAC7B,CAAC,EAAE,KAAK,CAAC;CACT;AAED;;GAEG;AACH,oBAAY,oBAAoB,GAAG,WAAW,CAAC,qBAAqB,CAAC,KAAK,EAAE,wBAAwB,CAAC,CAAC;AAEtG;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACxC;;;;OAIG;IACH,CAAC,EAAE,MAAM,CAAC;IACV;;;;OAIG;IACH,IAAI,EAAE,OAAO,CAAC;IACd;;;;OAIG;IACH,MAAM,EAAE,mBAAmB,EAAE,CAAC;IAC9B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,KAAK,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;IAChD;;;;OAIG;IACH,WAAW,EAAE,IAAI,CAAC,cAAc,EAAE,IAAI,GAAG,OAALine truncated
@@ -1,234 +0,0 @@
"use strict";
/**
* Types extracted from https://discord.com/developers/docs/topics/gateway
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.GatewayDispatchEvents = exports.GatewayIntentBits = exports.GatewayCloseCodes = exports.GatewayOpcodes = exports.GatewayVersion = void 0;
__exportStar(require("./common"), exports);
exports.GatewayVersion = '9';
/**
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes
*/
var GatewayOpcodes;
(function (GatewayOpcodes) {
/**
* An event was dispatched
*/
GatewayOpcodes[GatewayOpcodes["Dispatch"] = 0] = "Dispatch";
/**
* A bidirectional opcode to maintain an active gateway connection.
* Fired periodically by the client, or fired by the gateway to request an immediate heartbeat from the client.
*/
GatewayOpcodes[GatewayOpcodes["Heartbeat"] = 1] = "Heartbeat";
/**
* Starts a new session during the initial handshake
*/
GatewayOpcodes[GatewayOpcodes["Identify"] = 2] = "Identify";
/**
* Update the client's presence
*/
GatewayOpcodes[GatewayOpcodes["PresenceUpdate"] = 3] = "PresenceUpdate";
/**
* Used to join/leave or move between voice channels
*/
GatewayOpcodes[GatewayOpcodes["VoiceStateUpdate"] = 4] = "VoiceStateUpdate";
/**
* Resume a previous session that was disconnected
*/
GatewayOpcodes[GatewayOpcodes["Resume"] = 6] = "Resume";
/**
* You should attempt to reconnect and resume immediately
*/
GatewayOpcodes[GatewayOpcodes["Reconnect"] = 7] = "Reconnect";
/**
* Request information about offline guild members in a large guild
*/
GatewayOpcodes[GatewayOpcodes["RequestGuildMembers"] = 8] = "RequestGuildMembers";
/**
* The session has been invalidated. You should reconnect and identify/resume accordingly
*/
GatewayOpcodes[GatewayOpcodes["InvalidSession"] = 9] = "InvalidSession";
/**
* Sent immediately after connecting, contains the `heartbeat_interval` to use
*/
GatewayOpcodes[GatewayOpcodes["Hello"] = 10] = "Hello";
/**
* Sent in response to receiving a heartbeat to acknowledge that it has been received
*/
GatewayOpcodes[GatewayOpcodes["HeartbeatAck"] = 11] = "HeartbeatAck";
})(GatewayOpcodes = exports.GatewayOpcodes || (exports.GatewayOpcodes = {}));
/**
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes
*/
var GatewayCloseCodes;
(function (GatewayCloseCodes) {
/**
* We're not sure what went wrong. Try reconnecting?
*/
GatewayCloseCodes[GatewayCloseCodes["UnknownError"] = 4000] = "UnknownError";
/**
* You sent an invalid Gateway opcode or an invalid payload for an opcode. Don't do that!
*
* See https://discord.com/developers/docs/topics/gateway#payloads-and-opcodes
*/
GatewayCloseCodes[GatewayCloseCodes["UnknownOpcode"] = 4001] = "UnknownOpcode";
/**
* You sent an invalid payload to us. Don't do that!
*
* See https://discord.com/developers/docs/topics/gateway#sending-payloads
*/
GatewayCloseCodes[GatewayCloseCodes["DecodeError"] = 4002] = "DecodeError";
/**
* You sent us a payload prior to identifying
*
* See https://discord.com/developers/docs/topics/gateway#identify
*/
GatewayCloseCodes[GatewayCloseCodes["NotAuthenticated"] = 4003] = "NotAuthenticated";
/**
* The account token sent with your identify payload is incorrect
*
* See https://discord.com/developers/docs/topics/gateway#identify
*/
GatewayCloseCodes[GatewayCloseCodes["AuthenticationFailed"] = 4004] = "AuthenticationFailed";
/**
* You sent more than one identify payload. Don't do that!
*/
GatewayCloseCodes[GatewayCloseCodes["AlreadyAuthenticated"] = 4005] = "AlreadyAuthenticated";
/**
* The sequence sent when resuming the session was invalid. Reconnect and start a new session
*
* See https://discord.com/developers/docs/topics/gateway#resume
*/
GatewayCloseCodes[GatewayCloseCodes["InvalidSeq"] = 4007] = "InvalidSeq";
/**
* Woah nelly! You're sending payloads to us too quickly. Slow it down! You will be disconnected on receiving this
*/
GatewayCloseCodes[GatewayCloseCodes["RateLimited"] = 4008] = "RateLimited";
/**
* Your session timed out. Reconnect and start a new one
*/
GatewayCloseCodes[GatewayCloseCodes["SessionTimedOut"] = 4009] = "SessionTimedOut";
/**
* You sent us an invalid shard when identifying
*
* See https://discord.com/developers/docs/topics/gateway#sharding
*/
GatewayCloseCodes[GatewayCloseCodes["InvalidShard"] = 4010] = "InvalidShard";
/**
* The session would have handled too many guilds - you are required to shard your connection in order to connect
*
* See https://discord.com/developers/docs/topics/gateway#sharding
*/
GatewayCloseCodes[GatewayCloseCodes["ShardingRequired"] = 4011] = "ShardingRequired";
/**
* You sent an invalid version for the gateway
*/
GatewayCloseCodes[GatewayCloseCodes["InvalidAPIVersion"] = 4012] = "InvalidAPIVersion";
/**
* You sent an invalid intent for a Gateway Intent. You may have incorrectly calculated the bitwise value
*
* See https://discord.com/developers/docs/topics/gateway#gateway-intents
*/
GatewayCloseCodes[GatewayCloseCodes["InvalidIntents"] = 4013] = "InvalidIntents";
/**
* You sent a disallowed intent for a Gateway Intent. You may have tried to specify an intent that you have not
* enabled or are not whitelisted for
*
* See https://discord.com/developers/docs/topics/gateway#gateway-intents
*
* See https://discord.com/developers/docs/topics/gateway#privileged-intents
*/
GatewayCloseCodes[GatewayCloseCodes["DisallowedIntents"] = 4014] = "DisallowedIntents";
})(GatewayCloseCodes = exports.GatewayCloseCodes || (exports.GatewayCloseCodes = {}));
/**
* https://discord.com/developers/docs/topics/gateway#list-of-intents
*/
var GatewayIntentBits;
(function (GatewayIntentBits) {
GatewayIntentBits[GatewayIntentBits["Guilds"] = 1] = "Guilds";
GatewayIntentBits[GatewayIntentBits["GuildMembers"] = 2] = "GuildMembers";
GatewayIntentBits[GatewayIntentBits["GuildBans"] = 4] = "GuildBans";
GatewayIntentBits[GatewayIntentBits["GuildEmojisAndStickers"] = 8] = "GuildEmojisAndStickers";
GatewayIntentBits[GatewayIntentBits["GuildIntegrations"] = 16] = "GuildIntegrations";
GatewayIntentBits[GatewayIntentBits["GuildWebhooks"] = 32] = "GuildWebhooks";
GatewayIntentBits[GatewayIntentBits["GuildInvites"] = 64] = "GuildInvites";
GatewayIntentBits[GatewayIntentBits["GuildVoiceStates"] = 128] = "GuildVoiceStates";
GatewayIntentBits[GatewayIntentBits["GuildPresences"] = 256] = "GuildPresences";
GatewayIntentBits[GatewayIntentBits["GuildMessages"] = 512] = "GuildMessages";
GatewayIntentBits[GatewayIntentBits["GuildMessageReactions"] = 1024] = "GuildMessageReactions";
GatewayIntentBits[GatewayIntentBits["GuildMessageTyping"] = 2048] = "GuildMessageTyping";
GatewayIntentBits[GatewayIntentBits["DirectMessages"] = 4096] = "DirectMessages";
GatewayIntentBits[GatewayIntentBits["DirectMessageReactions"] = 8192] = "DirectMessageReactions";
GatewayIntentBits[GatewayIntentBits["DirectMessageTyping"] = 16384] = "DirectMessageTyping";
})(GatewayIntentBits = exports.GatewayIntentBits || (exports.GatewayIntentBits = {}));
/**
* https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events
*/
var GatewayDispatchEvents;
(function (GatewayDispatchEvents) {
GatewayDispatchEvents["ApplicationCommandCreate"] = "APPLICATION_COMMAND_CREATE";
GatewayDispatchEvents["ApplicationCommandDelete"] = "APPLICATION_COMMAND_DELETE";
GatewayDispatchEvents["ApplicationCommandUpdate"] = "APPLICATION_COMMAND_UPDATE";
GatewayDispatchEvents["ChannelCreate"] = "CHANNEL_CREATE";
GatewayDispatchEvents["ChannelDelete"] = "CHANNEL_DELETE";
GatewayDispatchEvents["ChannelPinsUpdate"] = "CHANNEL_PINS_UPDATE";
GatewayDispatchEvents["ChannelUpdate"] = "CHANNEL_UPDATE";
GatewayDispatchEvents["GuildBanAdd"] = "GUILD_BAN_ADD";
GatewayDispatchEvents["GuildBanRemove"] = "GUILD_BAN_REMOVE";
GatewayDispatchEvents["GuildCreate"] = "GUILD_CREATE";
GatewayDispatchEvents["GuildDelete"] = "GUILD_DELETE";
GatewayDispatchEvents["GuildEmojisUpdate"] = "GUILD_EMOJIS_UPDATE";
GatewayDispatchEvents["GuildIntegrationsUpdate"] = "GUILD_INTEGRATIONS_UPDATE";
GatewayDispatchEvents["GuildMemberAdd"] = "GUILD_MEMBER_ADD";
GatewayDispatchEvents["GuildMemberRemove"] = "GUILD_MEMBER_REMOVE";
GatewayDispatchEvents["GuildMembersChunk"] = "GUILD_MEMBERS_CHUNK";
GatewayDispatchEvents["GuildMemberUpdate"] = "GUILD_MEMBER_UPDATE";
GatewayDispatchEvents["GuildRoleCreate"] = "GUILD_ROLE_CREATE";
GatewayDispatchEvents["GuildRoleDelete"] = "GUILD_ROLE_DELETE";
GatewayDispatchEvents["GuildRoleUpdate"] = "GUILD_ROLE_UPDATE";
GatewayDispatchEvents["GuildStickersUpdate"] = "GUILD_STICKERS_UPDATE";
GatewayDispatchEvents["GuildUpdate"] = "GUILD_UPDATE";
GatewayDispatchEvents["IntegrationCreate"] = "INTEGRATION_CREATE";
GatewayDispatchEvents["IntegrationDelete"] = "INTEGRATION_DELETE";
GatewayDispatchEvents["IntegrationUpdate"] = "INTEGRATION_UPDATE";
GatewayDispatchEvents["InteractionCreate"] = "INTERACTION_CREATE";
GatewayDispatchEvents["InviteCreate"] = "INVITE_CREATE";
GatewayDispatchEvents["InviteDelete"] = "INVITE_DELETE";
GatewayDispatchEvents["MessageCreate"] = "MESSAGE_CREATE";
GatewayDispatchEvents["MessageDelete"] = "MESSAGE_DELETE";
GatewayDispatchEvents["MessageDeleteBulk"] = "MESSAGE_DELETE_BULK";
GatewayDispatchEvents["MessageReactionAdd"] = "MESSAGE_REACTION_ADD";
GatewayDispatchEvents["MessageReactionRemove"] = "MESSAGE_REACTION_REMOVE";
GatewayDispatchEvents["MessageReactionRemoveAll"] = "MESSAGE_REACTION_REMOVE_ALL";
GatewayDispatchEvents["MessageReactionRemoveEmoji"] = "MESSAGE_REACTION_REMOVE_EMOJI";
GatewayDispatchEvents["MessageUpdate"] = "MESSAGE_UPDATE";
GatewayDispatchEvents["PresenceUpdate"] = "PRESENCE_UPDATE";
GatewayDispatchEvents["StageInstanceCreate"] = "STAGE_INSTANCE_CREATE";
GatewayDispatchEvents["StageInstanceDelete"] = "STAGE_INSTANCE_DELETE";
GatewayDispatchEvents["StageInstanceUpdate"] = "STAGE_INSTANCE_UPDATE";
GatewayDispatchEvents["Ready"] = "READY";
GatewayDispatchEvents["Resumed"] = "RESUMED";
GatewayDispatchEvents["ThreadCreate"] = "THREAD_CREATE";
GatewayDispatchEvents["ThreadDelete"] = "THREAD_DELETE";
GatewayDispatchEvents["ThreadListSync"] = "THREAD_LIST_SYNC";
GatewayDispatchEvents["ThreadMembersUpdate"] = "THREAD_MEMBERS_UPDATE";
GatewayDispatchEvents["ThreadMemberUpdate"] = "THREAD_MEMBER_UPDATE";
GatewayDispatchEvents["ThreadUpdate"] = "THREAD_UPDATE";
GatewayDispatchEvents["TypingStart"] = "TYPING_START";
GatewayDispatchEvents["UserUpdate"] = "USER_UPDATE";
GatewayDispatchEvents["VoiceServerUpdate"] = "VOICE_SERVER_UPDATE";
GatewayDispatchEvents["VoiceStateUpdate"] = "VOICE_STATE_UPDATE";
GatewayDispatchEvents["WebhooksUpdate"] = "WEBHOOKS_UPDATE";
})(GatewayDispatchEvents = exports.GatewayDispatchEvents || (exports.GatewayDispatchEvents = {}));
// #endregion Shared
//# sourceMappingURL=v9.js.map
@@ -1 +0,0 @@
{"version":3,"file":"v9.js","sourceRoot":"","sources":["v9.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;AA8BH,2CAAyB;AAEZ,QAAA,cAAc,GAAG,GAAG,CAAC;AAElC;;GAEG;AACH,IAAkB,cA8CjB;AA9CD,WAAkB,cAAc;IAC/B;;OAEG;IACH,2DAAQ,CAAA;IACR;;;OAGG;IACH,6DAAS,CAAA;IACT;;OAEG;IACH,2DAAQ,CAAA;IACR;;OAEG;IACH,uEAAc,CAAA;IACd;;OAEG;IACH,2EAAgB,CAAA;IAChB;;OAEG;IACH,uDAAU,CAAA;IACV;;OAEG;IACH,6DAAS,CAAA;IACT;;OAEG;IACH,iFAAmB,CAAA;IACnB;;OAEG;IACH,uEAAc,CAAA;IACd;;OAEG;IACH,sDAAK,CAAA;IACL;;OAEG;IACH,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,CAAA;IAChC,yDAAgC,CAAA;IAChC,kEAAyC,CAAA;IACzC,yDAAgC,CAAA;IAChC,sDAA6B,CAAA;IAC7B,4DAAmC,CAAA;IACnC,qDAA4B,CAAA;IAC5B,qDAA4B,CAAA;IAC5B,kEAAyC,CAAA;IACzC,8EAAqD,CAAA;IACrD,4DAAmC,CAAA;IACnC,kEAAyC,CAAA;IACzC,kEAAyC,CAAA;IACzC,kEAAyC,CAAA;IACzC,8DAAqC,CAAA;IACrC,8DAAqC,CAAA;IACrC,8DAAqC,CAAA;IACrC,sEAA6C,CAAA;IAC7C,qDAA4B,CAAA;IAC5B,iEAAwC,CAAA;IACxC,iEAAwC,CAAA;IACxC,iEAAwC,CAAA;IACxC,iEAAwC,CAAA;IACxC,uDAA8B,CAAA;IAC9B,uDAA8B,CAAA;IAC9B,yDAAgC,CAAA;IAChC,yDAAgC,CAAA;IAChC,kEAAyC,CAAA;IACzC,oEAA2C,CAAA;IAC3C,0EAAiD,CAAA;IACjD,iFAAwD,CAAA;IACxD,qFAA4D,CAAA;IAC5D,yDAAgC,CAAA;IAChC,2DAAkC,CAAA;IAClC,sEAA6C,CAAA;IAC7C,sEAA6C,CAAA;IAC7C,sEAA6C,CAAA;IAC7C,wCAAe,CAAA;IACf,4CAAmB,CAAA;IACnB,uDAA8B,CAAA;IAC9B,uDAA8B,CAAA;IAC9B,4DAAmC,CAAA;IACnC,sEAA6C,CAAA;IAC7C,oEAA2C,CAAA;IAC3C,uDAA8B,CAAA;IAC9B,qDAA4B,CAAA;IAC5B,mDAA0B,CAAA;IAC1B,kEAAyC,CAAA;IACzC,gEAAuC,CAAA;IACvC,2DAAkC,CAAA;AACnC,CAAC,EAtDiB,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAsDtC;AA47CD,oBAAoB"}
@@ -1,8 +0,0 @@
import mod from "./v9.js";
export default mod;
export const GatewayCloseCodes = mod.GatewayCloseCodes;
export const GatewayDispatchEvents = mod.GatewayDispatchEvents;
export const GatewayIntentBits = mod.GatewayIntentBits;
export const GatewayOpcodes = mod.GatewayOpcodes;
export const GatewayVersion = mod.GatewayVersion;
@@ -1,81 +0,0 @@
/**
* https://discord.com/developers/docs/reference#snowflakes
*/
export declare type Snowflake = string;
/**
* https://discord.com/developers/docs/topics/permissions
* @internal
*/
export declare type Permissions = string;
/**
* https://discord.com/developers/docs/reference#message-formatting-formats
*/
export declare const FormattingPatterns: {
/**
* Regular expression for matching a user mention, strictly without a nickname
*
* The `id` group property is present on the `exec` result of this expression
*/
readonly User: RegExp;
/**
* Regular expression for matching a user mention, strictly with a nickname
*
* The `id` group property is present on the `exec` result of this expression
*/
readonly UserWithNickname: RegExp;
/**
* Regular expression for matching a user mention, with or without a nickname
*
* The `id` group property is present on the `exec` result of this expression
*/
readonly UserWithOptionalNickname: RegExp;
/**
* Regular expression for matching a channel mention
*
* The `id` group property is present on the `exec` result of this expression
*/
readonly Channel: RegExp;
/**
* Regular expression for matching a role mention
*
* The `id` group property is present on the `exec` result of this expression
*/
readonly Role: RegExp;
/**
* Regular expression for matching a custom emoji, either static or animated
*
* The `animated`, `name` and `id` group properties are present on the `exec` result of this expression
*/
readonly Emoji: RegExp;
/**
* Regular expression for matching strictly an animated custom emoji
*
* The `animated`, `name` and `id` group properties are present on the `exec` result of this expression
*/
readonly AnimatedEmoji: RegExp;
/**
* Regular expression for matching strictly a static custom emoji
*
* The `name` and `id` group properties are present on the `exec` result of this expression
*/
readonly StaticEmoji: RegExp;
/**
* Regular expression for matching a timestamp, either default or custom styled
*
* The `timestamp` and `style` group properties are present on the `exec` result of this expression
*/
readonly Timestamp: RegExp;
/**
* Regular expression for matching strictly default styled timestamps
*
* The `timestamp` group property is present on the `exec` result of this expression
*/
readonly DefaultStyledTimestamp: RegExp;
/**
* Regular expression for matching strictly custom styled timestamps
*
* The `timestamp` and `style` group properties are present on the `exec` result of this expression
*/
readonly StyledTimestamp: RegExp;
};
//# sourceMappingURL=globals.d.ts.map
@@ -1 +0,0 @@
{"version":3,"file":"globals.d.ts","sourceRoot":"","sources":["globals.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,SAAS,GAAG,MAAM,CAAC;AAE/B;;;GAGG;AACH,oBAAY,WAAW,GAAG,MAAM,CAAC;AAEjC;;GAEG;AACH,eAAO,MAAM,kBAAkB;IAC9B;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;CAEM,CAAC"}
@@ -1,80 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FormattingPatterns = void 0;
/**
* https://discord.com/developers/docs/reference#message-formatting-formats
*/
exports.FormattingPatterns = {
/**
* Regular expression for matching a user mention, strictly without a nickname
*
* The `id` group property is present on the `exec` result of this expression
*/
User: /<@(?<id>\d{17,20})>/,
/**
* Regular expression for matching a user mention, strictly with a nickname
*
* The `id` group property is present on the `exec` result of this expression
*/
UserWithNickname: /<@!(?<id>\d{17,20})>/,
/**
* Regular expression for matching a user mention, with or without a nickname
*
* The `id` group property is present on the `exec` result of this expression
*/
UserWithOptionalNickname: /<@!?(?<id>\d{17,20})>/,
/**
* Regular expression for matching a channel mention
*
* The `id` group property is present on the `exec` result of this expression
*/
Channel: /<#(?<id>\d{17,20})>/,
/**
* Regular expression for matching a role mention
*
* The `id` group property is present on the `exec` result of this expression
*/
Role: /<@&(?<id>\d{17,20})>/,
/**
* Regular expression for matching a custom emoji, either static or animated
*
* The `animated`, `name` and `id` group properties are present on the `exec` result of this expression
*/
Emoji: /<(?<animated>a)?:(?<name>\w{2,32}):(?<id>\d{17,20})>/,
/**
* Regular expression for matching strictly an animated custom emoji
*
* The `animated`, `name` and `id` group properties are present on the `exec` result of this expression
*/
AnimatedEmoji: /<(?<animated>a):(?<name>\w{2,32}):(?<id>\d{17,20})>/,
/**
* Regular expression for matching strictly a static custom emoji
*
* The `name` and `id` group properties are present on the `exec` result of this expression
*/
StaticEmoji: /<:(?<name>\w{2,32}):(?<id>\d{17,20})>/,
/**
* Regular expression for matching a timestamp, either default or custom styled
*
* The `timestamp` and `style` group properties are present on the `exec` result of this expression
*/
Timestamp: /<t:(?<timestamp>-?\d{1,13})(:(?<style>[tTdDfFR]))?>/,
/**
* Regular expression for matching strictly default styled timestamps
*
* The `timestamp` group property is present on the `exec` result of this expression
*/
DefaultStyledTimestamp: /<t:(?<timestamp>-?\d{1,13})>/,
/**
* Regular expression for matching strictly custom styled timestamps
*
* The `timestamp` and `style` group properties are present on the `exec` result of this expression
*/
StyledTimestamp: /<t:(?<timestamp>-?\d{1,13}):(?<style>[tTdDfFR])>/,
};
/**
* Freezes the formatting patterns
* @internal
*/
Object.freeze(exports.FormattingPatterns);
//# sourceMappingURL=globals.js.map
@@ -1 +0,0 @@
{"version":3,"file":"globals.js","sourceRoot":"","sources":["globals.ts"],"names":[],"mappings":";;;AAWA;;GAEG;AACU,QAAA,kBAAkB,GAAG;IACjC;;;;OAIG;IACH,IAAI,EAAE,qBAAqB;IAC3B;;;;OAIG;IACH,gBAAgB,EAAE,sBAAsB;IACxC;;;;OAIG;IACH,wBAAwB,EAAE,uBAAuB;IACjD;;;;OAIG;IACH,OAAO,EAAE,qBAAqB;IAC9B;;;;OAIG;IACH,IAAI,EAAE,sBAAsB;IAC5B;;;;OAIG;IACH,KAAK,EAAE,sDAAsD;IAC7D;;;;OAIG;IACH,aAAa,EAAE,qDAAqD;IACpE;;;;OAIG;IACH,WAAW,EAAE,uCAAuC;IACpD;;;;OAIG;IACH,SAAS,EAAE,qDAAqD;IAChE;;;;OAIG;IACH,sBAAsB,EAAE,8BAA8B;IACtD;;;;OAIG;IACH,eAAe,EAAE,kDAAkD;CAC1D,CAAC;AAEX;;;GAGG;AACH,MAAM,CAAC,MAAM,CAAC,0BAAkB,CAAC,CAAC"}
@@ -1,4 +0,0 @@
import mod from "./globals.js";
export default mod;
export const FormattingPatterns = mod.FormattingPatterns;
@@ -1,212 +0,0 @@
{
"name": "discord-api-types",
"version": "0.22.0",
"description": "Discord API typings that are kept up to date for use in bot library creation.",
"main": "./v9.js",
"module": "./v9.mjs",
"types": "./v9.d.ts",
"exports": {
"./globals": {
"require": "./globals.js",
"import": "./globals.mjs"
},
"./v6": {
"require": "./v6.js",
"import": "./v6.mjs"
},
"./v8": {
"require": "./v8.js",
"import": "./v8.mjs"
},
"./v9": {
"require": "./v9.js",
"import": "./v9.mjs"
},
"./gateway": {
"require": "./gateway/index.js",
"import": "./gateway/index.mjs"
},
"./gateway/v*": {
"require": "./gateway/v*.js",
"import": "./gateway/v*.mjs"
},
"./payloads": {
"require": "./payloads/index.js",
"import": "./payloads/index.mjs"
},
"./payloads/v*": {
"require": "./payloads/v*/index.js",
"import": "./payloads/v*/index.mjs"
},
"./rest": {
"require": "./rest/index.js",
"import": "./rest/index.mjs"
},
"./rest/v*": {
"require": "./rest/v*/index.js",
"import": "./rest/v*/index.mjs"
},
"./rpc": {
"require": "./rpc/index.js",
"import": "./rpc/index.mjs"
},
"./rpc/v*": {
"require": "./rpc/v*.js",
"import": "./rpc/v*.mjs"
},
"./voice": {
"require": "./voice/index.js",
"import": "./voice/index.mjs"
},
"./voice/v*": {
"require": "./voice/v*.js",
"import": "./voice/v*.mjs"
},
"./utils": {
"require": "./utils/index.js",
"import": "./utils/index.mjs"
},
"./utils/v*": {
"require": "./utils/v*.js",
"import": "./utils/v*.mjs"
}
},
"scripts": {
"build:ci": "tsc --noEmit --incremental false",
"build:deno": "node ./scripts/deno.mjs",
"build:node": "tsc && run-p esm:*",
"clean:deno": "rimraf deno/",
"clean:node": "rimraf {gateway,payloads,rest,rpc,voice,utils}/**/*.{js,mjs,d.ts,*map} {globals,v*}.{js,mjs,d.ts,*map}",
"clean": "run-p clean:*",
"esm:gateway": "gen-esm-wrapper ./gateway/index.js ./gateway/index.mjs",
"esm:globals": "gen-esm-wrapper ./globals.js ./globals.mjs",
"esm:payloads": "gen-esm-wrapper ./payloads/index.js ./payloads/index.mjs",
"esm:rest": "gen-esm-wrapper ./rest/index.js ./rest/index.mjs",
"esm:rpc": "gen-esm-wrapper ./rpc/index.js ./rpc/index.mjs",
"esm:utils": "gen-esm-wrapper ./utils/index.js ./utils/index.mjs",
"esm:versions": "node ./scripts/versions.mjs",
"esm:voice": "gen-esm-wrapper ./voice/index.js ./voice/index.mjs",
"lint": "eslint --fix --ext mjs,ts {gateway,payloads,rest,rpc,voice,utils}/**/*.ts {globals,v*}.ts",
"postpublish": "run-s clean:node build:deno",
"prepare": "is-ci || husky install",
"prepublishOnly": "run-s clean test:lint build:node",
"test:lint": "eslint --ext mjs,ts {gateway,payloads,rest,rpc,voice,utils}/**/*.ts {globals,v*}.ts",
"pretest:types": "tsc",
"test:types": "tsd",
"posttest:types": "npm run clean:node",
"version": "conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md"
},
"keywords": [
"discord",
"discord api",
"types",
"discordjs"
],
"author": "Vlad Frangu <kingdgrizzle@gmail.com>",
"license": "MIT",
"files": [
"{gateway,payloads,rest,rpc,voice,utils}/**/*.{js,js.map,d.ts,d.ts.map,mjs}",
"{globals,v*}.{js,js.map,d.ts,d.ts.map,mjs}"
],
"engines": {
"node": ">=12"
},
"devDependencies": {
"@babel/core": "^7.14.6",
"@babel/eslint-parser": "^7.14.7",
"@babel/plugin-syntax-top-level-await": "^7.14.5",
"@commitlint/cli": "^12.1.4",
"@commitlint/config-angular": "^12.1.4",
"@types/node": "^16.3.3",
"@typescript-eslint/eslint-plugin": "^4.28.3",
"@typescript-eslint/parser": "^4.28.3",
"conventional-changelog-cli": "^2.1.1",
"eslint": "^7.30.0",
"eslint-config-marine": "^9.0.6",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^3.4.0",
"gen-esm-wrapper": "^1.1.2",
"husky": "^7.0.1",
"is-ci": "^3.0.0",
"lint-staged": "^11.0.1",
"npm-run-all": "^4.1.5",
"prettier": "^2.3.2",
"pretty-quick": "^3.1.1",
"rimraf": "^3.0.2",
"tsd": "^0.17.0",
"typescript": "^4.3.5"
},
"repository": {
"type": "git",
"url": "https://github.com/discordjs/discord-api-types"
},
"eslintConfig": {
"extends": "marine/prettier/node",
"parserOptions": {
"project": "./tsconfig.eslint.json",
"extraFileExtensions": [
".mjs"
]
},
"rules": {
"@typescript-eslint/naming-convention": 0
},
"overrides": [
{
"files": [
"scripts/**/*.mjs"
],
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaVersion": 2021,
"sourceType": "module"
}
}
]
},
"lint-staged": {
"{gateway,payloads,rest,rpc,voice,utils}/**/*.{mjs,js,ts}": "eslint --fix --ext mjs,js,ts",
"{globals,v*}.ts": "eslint --fix --ext mjs,js,ts"
},
"commitlint": {
"extends": [
"@commitlint/config-angular"
],
"rules": {
"type-enum": [
2,
"always",
[
"chore",
"build",
"ci",
"docs",
"feat",
"fix",
"perf",
"refactor",
"revert",
"style",
"test",
"types",
"wip"
]
],
"scope-case": [
1,
"always",
"pascal-case"
]
}
},
"standard-version": {
"skip": {
"changelog": true,
"commit": true,
"tag": true
}
},
"tsd": {
"directory": "tests"
}
}
@@ -1,2 +0,0 @@
export * from './v9/index';
//# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAGA,cAAc,YAAY,CAAC"}
@@ -1,16 +0,0 @@
"use strict";
// This file exports all the payloads available in the recommended API version
// Thereby, things MAY break in the future. Try sticking to imports from a specific version
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./v9/index"), exports);
//# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA,8EAA8E;AAC9E,2FAA2F;;;;;;;;;;;;AAE3F,6CAA2B"}
@@ -1,48 +0,0 @@
import mod from "./index.js";
export default mod;
export const ActivityFlags = mod.ActivityFlags;
export const ActivityPlatform = mod.ActivityPlatform;
export const ActivityType = mod.ActivityType;
export const AllowedMentionsTypes = mod.AllowedMentionsTypes;
export const ApplicationCommandOptionType = mod.ApplicationCommandOptionType;
export const ApplicationCommandPermissionType = mod.ApplicationCommandPermissionType;
export const ApplicationFlags = mod.ApplicationFlags;
export const AuditLogEvent = mod.AuditLogEvent;
export const AuditLogOptionsType = mod.AuditLogOptionsType;
export const ButtonStyle = mod.ButtonStyle;
export const ChannelType = mod.ChannelType;
export const ComponentType = mod.ComponentType;
export const ConnectionVisibility = mod.ConnectionVisibility;
export const EmbedType = mod.EmbedType;
export const GuildDefaultMessageNotifications = mod.GuildDefaultMessageNotifications;
export const GuildExplicitContentFilter = mod.GuildExplicitContentFilter;
export const GuildFeature = mod.GuildFeature;
export const GuildMFALevel = mod.GuildMFALevel;
export const GuildNSFWLevel = mod.GuildNSFWLevel;
export const GuildPremiumTier = mod.GuildPremiumTier;
export const GuildSystemChannelFlags = mod.GuildSystemChannelFlags;
export const GuildVerificationLevel = mod.GuildVerificationLevel;
export const GuildWidgetStyle = mod.GuildWidgetStyle;
export const IntegrationExpireBehavior = mod.IntegrationExpireBehavior;
export const InteractionResponseType = mod.InteractionResponseType;
export const InteractionType = mod.InteractionType;
export const InviteTargetType = mod.InviteTargetType;
export const MembershipScreeningFieldType = mod.MembershipScreeningFieldType;
export const MessageActivityType = mod.MessageActivityType;
export const MessageFlags = mod.MessageFlags;
export const MessageType = mod.MessageType;
export const OAuth2Scopes = mod.OAuth2Scopes;
export const OverwriteType = mod.OverwriteType;
export const PermissionFlagsBits = mod.PermissionFlagsBits;
export const PresenceUpdateStatus = mod.PresenceUpdateStatus;
export const StageInstancePrivacyLevel = mod.StageInstancePrivacyLevel;
export const StickerFormatType = mod.StickerFormatType;
export const StickerType = mod.StickerType;
export const TeamMemberMembershipState = mod.TeamMemberMembershipState;
export const ThreadAutoArchiveDuration = mod.ThreadAutoArchiveDuration;
export const ThreadMemberFlags = mod.ThreadMemberFlags;
export const UserFlags = mod.UserFlags;
export const UserPremiumType = mod.UserPremiumType;
export const VideoQualityMode = mod.VideoQualityMode;
export const WebhookType = mod.WebhookType;
@@ -1,414 +0,0 @@
/**
* Types extracted from https://discord.com/developers/docs/resources/audit-log
*/
import type { APIOverwrite, ChannelType } from './channel';
import type { APIGuildIntegration, GuildDefaultMessageNotifications, GuildExplicitContentFilter, GuildMFALevel, GuildVerificationLevel, IntegrationExpireBehavior } from './guild';
import type { APIRole } from './permissions';
import type { APIUser } from './user';
import type { APIWebhook } from './webhook';
/**
* https://discord.com/developers/docs/resources/audit-log#audit-log-object-audit-log-structure
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIAuditLog {
webhooks: APIWebhook[];
users: APIUser[];
audit_log_entries: APIAuditLogEntry[];
integrations: APIGuildIntegration[];
}
/**
* https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-entry-structure
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIAuditLogEntry {
target_id: string | null;
changes?: APIAuditLogChange[];
user_id: string | null;
id: string;
action_type: AuditLogEvent;
options?: APIAuditLogOptions;
reason?: string;
}
/**
* https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare enum AuditLogEvent {
GUILD_UPDATE = 1,
CHANNEL_CREATE = 10,
CHANNEL_UPDATE = 11,
CHANNEL_DELETE = 12,
CHANNEL_OVERWRITE_CREATE = 13,
CHANNEL_OVERWRITE_UPDATE = 14,
CHANNEL_OVERWRITE_DELETE = 15,
MEMBER_KICK = 20,
MEMBER_PRUNE = 21,
MEMBER_BAN_ADD = 22,
MEMBER_BAN_REMOVE = 23,
MEMBER_UPDATE = 24,
MEMBER_ROLE_UPDATE = 25,
MEMBER_MOVE = 26,
MEMBER_DISCONNECT = 27,
BOT_ADD = 28,
ROLE_CREATE = 30,
ROLE_UPDATE = 31,
ROLE_DELETE = 32,
INVITE_CREATE = 40,
INVITE_UPDATE = 41,
INVITE_DELETE = 42,
WEBHOOK_CREATE = 50,
WEBHOOK_UPDATE = 51,
WEBHOOK_DELETE = 52,
EMOJI_CREATE = 60,
EMOJI_UPDATE = 61,
EMOJI_DELETE = 62,
MESSAGE_DELETE = 72,
MESSAGE_BULK_DELETE = 73,
MESSAGE_PIN = 74,
MESSAGE_UNPIN = 75,
INTEGRATION_CREATE = 80,
INTEGRATION_UPDATE = 81,
INTEGRATION_DELETE = 82
}
/**
* https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIAuditLogOptions {
/**
* Present from:
* - MEMBER_PRUNE
*/
delete_member_days?: string;
/**
* Present from:
* - MEMBER_PRUNE
*/
members_removed?: string;
/**
* Present from:
* - MEMBER_MOVE
* - MESSAGE_PIN
* - MESSAGE_UNPIN
* - MESSAGE_DELETE
*/
channel_id?: string;
/**
* Present from:
* - MESSAGE_PIN
* - MESSAGE_UNPIN
*/
message_id?: string;
/**
* Present from:
* - MESSAGE_DELETE
* - MESSAGE_BULK_DELETE
* - MEMBER_DISCONNECT
* - MEMBER_MOVE
*/
count?: string;
/**
* Present from:
* - CHANNEL_OVERWRITE_CREATE
* - CHANNEL_OVERWRITE_UPDATE
* - CHANNEL_OVERWRITE_DELETE
*/
id?: string;
/**
* Present from:
* - CHANNEL_OVERWRITE_CREATE
* - CHANNEL_OVERWRITE_UPDATE
* - CHANNEL_OVERWRITE_DELETE
*/
type: AuditLogOptionsType;
/**
* Present from:
* - CHANNEL_OVERWRITE_CREATE
* - CHANNEL_OVERWRITE_UPDATE
* - CHANNEL_OVERWRITE_DELETE
*
* **Present only if the {@link APIAuditLogOptions#type entry type} is "role"**
*/
role_name?: string;
}
/**
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare enum AuditLogOptionsType {
Member = "member",
Role = "role"
}
/**
* https://discord.com/developers/docs/resources/audit-log#audit-log-change-object-audit-log-change-structure
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChange = APIAuditLogChangeKeyName | APIAuditLogChangeKeyIconHash | APIAuditLogChangeKeySplashHash | APIAuditLogChangeKeyOwnerID | APIAuditLogChangeKeyRegion | APIAuditLogChangeKeyAFKChannelID | APIAuditLogChangeKeyAFKTimeout | APIAuditLogChangeKeyMFALevel | APIAuditLogChangeKeyVerificationLevel | APIAuditLogChangeKeyExplicitContentFilter | APIAuditLogChangeKeyDefaultMessageNotifications | APIAuditLogChangeKeyVanityURLCode | APIAuditLogChangeKey$Add | APIAuditLogChangeKey$Remove | APIAuditLogChangeKeyPruneDeleteDays | APIAuditLogChangeKeyWidgetEnabled | APIAuditLogChangeKeyWidgetChannelID | APIAuditLogChangeKeySystemChannelID | APIAuditLogChangeKeyPosition | APIAuditLogChangeKeyTopic | APIAuditLogChangeKeyBitrate | APIAuditLogChangeKeyPermissionOverwrites | APIAuditLogChangeKeyNSFW | APIAuditLogChangeKeyApplicationID | APIAuditLogChangeKeyRateLimitPerUser | APIAuditLogChangeKeyPermissions | APIAuditLogChangeKeyPermissionsNew | APIAuditLogChangeKeyColor | APIAuditLogChangeKeyHoist | APIAuditLogChangeKeyMentionable | APIAuditLogChangeKeyAllow | APIAuditLogChangeKeyAllowNew | APIAuditLogChangeKeyDeny | APIAuditLogChangeKeyDenyNew | APIAuditLogChangeKeyCode | APIAuditLogChangeKeyChannelID | APIAuditLogChangeKeyInviterID | APIAuditLogChangeKeyMaxUses | APIAuditLogChangeKeyUses | APIAuditLogChangeKeyMaxAge | APIAuditLogChangeKeyTemporary | APIAuditLogChangeKeyDeaf | APIAuditLogChangeKeyMute | APIAuditLogChangeKeyNick | APIAuditLogChangeKeyAvatarHash | APIAuditLogChangeKeyID | APIAuditLogChangeKeyType | APIAuditLogChangeKeyEnableEmoticons | APIAuditLogChangeKeyExpireBehavior | APIAuditLogChangeKeyExpireGracePeriod;
/**
* Returned when a guild's name is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyName = AuditLogChangeData<'name', string>;
/**
* Returned when a guild's icon is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyIconHash = AuditLogChangeData<'icon_hash', string>;
/**
* Returned when a guild's splash is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeySplashHash = AuditLogChangeData<'splash_hash', string>;
/**
* Returned when a guild's owner ID is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyOwnerID = AuditLogChangeData<'owner_id', string>;
/**
* Returned when a guild's region is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyRegion = AuditLogChangeData<'region', string>;
/**
* Returned when a guild's afk_channel_id is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyAFKChannelID = AuditLogChangeData<'afk_channel_id', string>;
/**
* Returned when a guild's afk_timeout is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyAFKTimeout = AuditLogChangeData<'afk_timeout', number>;
/**
* Returned when a guild's mfa_level is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyMFALevel = AuditLogChangeData<'mfa_level', GuildMFALevel>;
/**
* Returned when a guild's verification_level is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyVerificationLevel = AuditLogChangeData<'verification_level', GuildVerificationLevel>;
/**
* Returned when a guild's explicit_content_filter is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyExplicitContentFilter = AuditLogChangeData<'explicit_content_filter', GuildExplicitContentFilter>;
/**
* Returned when a guild's default_message_notifications is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyDefaultMessageNotifications = AuditLogChangeData<'default_message_notifications', GuildDefaultMessageNotifications>;
/**
* Returned when a guild's vanity_url_code is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyVanityURLCode = AuditLogChangeData<'vanity_url_code', string>;
/**
* Returned when new role(s) are added
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKey$Add = AuditLogChangeData<'$add', APIRole[]>;
/**
* Returned when role(s) are removed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKey$Remove = AuditLogChangeData<'$remove', APIRole[]>;
/**
* Returned when there is a change in number of days after which inactive and role-unassigned members are kicked
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyPruneDeleteDays = AuditLogChangeData<'prune_delete_days', number>;
/**
* Returned when a guild's widget is enabled
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyWidgetEnabled = AuditLogChangeData<'widget_enabled', boolean>;
/**
* Returned when a guild's widget_channel_id is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyWidgetChannelID = AuditLogChangeData<'widget_channel_id', string>;
/**
* Returned when a guild's system_channel_id is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeySystemChannelID = AuditLogChangeData<'system_channel_id', string>;
/**
* Returned when a channel's position is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyPosition = AuditLogChangeData<'position', number>;
/**
* Returned when a channel's topic is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyTopic = AuditLogChangeData<'topic', string>;
/**
* Returned when a voice channel's bitrate is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyBitrate = AuditLogChangeData<'bitrate', number>;
/**
* Returned when a channel's permission overwrites is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyPermissionOverwrites = AuditLogChangeData<'permission_overwrites', APIOverwrite[]>;
/**
* Returned when a channel's NSFW restriction is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyNSFW = AuditLogChangeData<'nsfw', boolean>;
/**
* The application ID of the added or removed Webhook or Bot
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyApplicationID = AuditLogChangeData<'application_id', string>;
/**
* Returned when a channel's amount of seconds a user has to wait before sending another message
* is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyRateLimitPerUser = AuditLogChangeData<'rate_limit_per_user', number>;
/**
* Returned when a permission bitfield is changed
* @deprecated Use `permissions_new` instead
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyPermissions = AuditLogChangeData<'permissions', number>;
/**
* Returned when a permission bitfield is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyPermissionsNew = AuditLogChangeData<'permissions_new', string>;
/**
* Returned when a role's color is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyColor = AuditLogChangeData<'color', number>;
/**
* Returned when a role's hoist status is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyHoist = AuditLogChangeData<'hoist', boolean>;
/**
* Returned when a role's mentionable status is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyMentionable = AuditLogChangeData<'mentionable', boolean>;
/**
* Returned when an overwrite's allowed permissions bitfield is changed
* @deprecated Use `allow_new` instead
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyAllow = AuditLogChangeData<'allow', number>;
/**
* Returned when an overwrite's allowed permissions bitfield is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyAllowNew = AuditLogChangeData<'allow_new', string>;
/**
* Returned when an overwrite's denied permissions bitfield is changed
* @deprecated Use `deny_new` instead
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyDeny = AuditLogChangeData<'deny', number>;
/**
* Returned when an overwrite's denied permissions bitfield is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyDenyNew = AuditLogChangeData<'deny_new', string>;
/**
* Returned when an invite's code is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyCode = AuditLogChangeData<'code', string>;
/**
* Returned when an invite's channel_id is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyChannelID = AuditLogChangeData<'channel_id', string>;
/**
* Returned when an invite's inviter_id is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyInviterID = AuditLogChangeData<'inviter_id', string>;
/**
* Returned when an invite's max_uses is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyMaxUses = AuditLogChangeData<'max_uses', number>;
/**
* Returned when an invite's uses is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyUses = AuditLogChangeData<'uses', number>;
/**
* Returned when an invite's max_age is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyMaxAge = AuditLogChangeData<'max_age', number>;
/**
* Returned when an invite's temporary status is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyTemporary = AuditLogChangeData<'temporary', boolean>;
/**
* Returned when a user's deaf status is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyDeaf = AuditLogChangeData<'deaf', boolean>;
/**
* Returned when a user's mute status is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyMute = AuditLogChangeData<'mute', boolean>;
/**
* Returned when a user's nick is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyNick = AuditLogChangeData<'mute', boolean>;
/**
* Returned when a user's avatar_hash is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyAvatarHash = AuditLogChangeData<'avatar_hash', string>;
/**
* The ID of the changed entity - sometimes used in conjunction with other keys
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIAuditLogChangeKeyID {
key: 'id';
new_value: string;
old_value?: string;
}
/**
* The type of entity created
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyType = AuditLogChangeData<'type', ChannelType | string>;
/**
* Returned when an integration's enable_emoticons is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyEnableEmoticons = AuditLogChangeData<'enable_emoticons', boolean>;
/**
* Returned when an integration's expire_behavior is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyExpireBehavior = AuditLogChangeData<'expire_behavior', IntegrationExpireBehavior>;
/**
* Returned when an integration's expire_grace_period is changed
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare type APIAuditLogChangeKeyExpireGracePeriod = AuditLogChangeData<'expire_grace_period', number>;
/**
* @internal
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
interface AuditLogChangeData<K extends string, D extends unknown> {
key: K;
new_value?: D;
old_value?: D;
}
export {};
//# sourceMappingURL=auditLog.d.ts.map
@@ -1 +0,0 @@
{"version":3,"file":"auditLog.d.ts","sourceRoot":"","sources":["auditLog.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC3D,OAAO,KAAK,EACX,mBAAmB,EACnB,gCAAgC,EAChC,0BAA0B,EAC1B,aAAa,EACb,sBAAsB,EACtB,yBAAyB,EACzB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAA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BAAkB,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;AAE/F;;;GAGG;AACH,oBAAY,yBAAyB,GAAG,kBAAkB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AAE5E;;;GAGG;AACH,oBAAY,yBAAyB,GAAG,kBAAkB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAE7E;;;GAGG;AACH,oBAAY,+BAA+B,GAAG,kBAAkB,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;AAEzF;;;;GAIG;AACH,oBAAY,yBAAyB,GAAG,kBAAkB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AAE5E;;;GAGG;AACH,oBAAY,4BAA4B,GAAG,kBAAkB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;AAEnF;;;;GAIG;ALine truncated
@@ -1,57 +0,0 @@
"use strict";
/**
* Types extracted from https://discord.com/developers/docs/resources/audit-log
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuditLogOptionsType = exports.AuditLogEvent = void 0;
/**
* https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
var AuditLogEvent;
(function (AuditLogEvent) {
AuditLogEvent[AuditLogEvent["GUILD_UPDATE"] = 1] = "GUILD_UPDATE";
AuditLogEvent[AuditLogEvent["CHANNEL_CREATE"] = 10] = "CHANNEL_CREATE";
AuditLogEvent[AuditLogEvent["CHANNEL_UPDATE"] = 11] = "CHANNEL_UPDATE";
AuditLogEvent[AuditLogEvent["CHANNEL_DELETE"] = 12] = "CHANNEL_DELETE";
AuditLogEvent[AuditLogEvent["CHANNEL_OVERWRITE_CREATE"] = 13] = "CHANNEL_OVERWRITE_CREATE";
AuditLogEvent[AuditLogEvent["CHANNEL_OVERWRITE_UPDATE"] = 14] = "CHANNEL_OVERWRITE_UPDATE";
AuditLogEvent[AuditLogEvent["CHANNEL_OVERWRITE_DELETE"] = 15] = "CHANNEL_OVERWRITE_DELETE";
AuditLogEvent[AuditLogEvent["MEMBER_KICK"] = 20] = "MEMBER_KICK";
AuditLogEvent[AuditLogEvent["MEMBER_PRUNE"] = 21] = "MEMBER_PRUNE";
AuditLogEvent[AuditLogEvent["MEMBER_BAN_ADD"] = 22] = "MEMBER_BAN_ADD";
AuditLogEvent[AuditLogEvent["MEMBER_BAN_REMOVE"] = 23] = "MEMBER_BAN_REMOVE";
AuditLogEvent[AuditLogEvent["MEMBER_UPDATE"] = 24] = "MEMBER_UPDATE";
AuditLogEvent[AuditLogEvent["MEMBER_ROLE_UPDATE"] = 25] = "MEMBER_ROLE_UPDATE";
AuditLogEvent[AuditLogEvent["MEMBER_MOVE"] = 26] = "MEMBER_MOVE";
AuditLogEvent[AuditLogEvent["MEMBER_DISCONNECT"] = 27] = "MEMBER_DISCONNECT";
AuditLogEvent[AuditLogEvent["BOT_ADD"] = 28] = "BOT_ADD";
AuditLogEvent[AuditLogEvent["ROLE_CREATE"] = 30] = "ROLE_CREATE";
AuditLogEvent[AuditLogEvent["ROLE_UPDATE"] = 31] = "ROLE_UPDATE";
AuditLogEvent[AuditLogEvent["ROLE_DELETE"] = 32] = "ROLE_DELETE";
AuditLogEvent[AuditLogEvent["INVITE_CREATE"] = 40] = "INVITE_CREATE";
AuditLogEvent[AuditLogEvent["INVITE_UPDATE"] = 41] = "INVITE_UPDATE";
AuditLogEvent[AuditLogEvent["INVITE_DELETE"] = 42] = "INVITE_DELETE";
AuditLogEvent[AuditLogEvent["WEBHOOK_CREATE"] = 50] = "WEBHOOK_CREATE";
AuditLogEvent[AuditLogEvent["WEBHOOK_UPDATE"] = 51] = "WEBHOOK_UPDATE";
AuditLogEvent[AuditLogEvent["WEBHOOK_DELETE"] = 52] = "WEBHOOK_DELETE";
AuditLogEvent[AuditLogEvent["EMOJI_CREATE"] = 60] = "EMOJI_CREATE";
AuditLogEvent[AuditLogEvent["EMOJI_UPDATE"] = 61] = "EMOJI_UPDATE";
AuditLogEvent[AuditLogEvent["EMOJI_DELETE"] = 62] = "EMOJI_DELETE";
AuditLogEvent[AuditLogEvent["MESSAGE_DELETE"] = 72] = "MESSAGE_DELETE";
AuditLogEvent[AuditLogEvent["MESSAGE_BULK_DELETE"] = 73] = "MESSAGE_BULK_DELETE";
AuditLogEvent[AuditLogEvent["MESSAGE_PIN"] = 74] = "MESSAGE_PIN";
AuditLogEvent[AuditLogEvent["MESSAGE_UNPIN"] = 75] = "MESSAGE_UNPIN";
AuditLogEvent[AuditLogEvent["INTEGRATION_CREATE"] = 80] = "INTEGRATION_CREATE";
AuditLogEvent[AuditLogEvent["INTEGRATION_UPDATE"] = 81] = "INTEGRATION_UPDATE";
AuditLogEvent[AuditLogEvent["INTEGRATION_DELETE"] = 82] = "INTEGRATION_DELETE";
})(AuditLogEvent = exports.AuditLogEvent || (exports.AuditLogEvent = {}));
/**
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
var AuditLogOptionsType;
(function (AuditLogOptionsType) {
AuditLogOptionsType["Member"] = "member";
AuditLogOptionsType["Role"] = "role";
})(AuditLogOptionsType = exports.AuditLogOptionsType || (exports.AuditLogOptionsType = {}));
//# sourceMappingURL=auditLog.js.map
@@ -1 +0,0 @@
{"version":3,"file":"auditLog.js","sourceRoot":"","sources":["auditLog.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAwCH;;;GAGG;AACH,IAAY,aA4CX;AA5CD,WAAY,aAAa;IACxB,iEAAgB,CAAA;IAEhB,sEAAmB,CAAA;IACnB,sEAAc,CAAA;IACd,sEAAc,CAAA;IACd,0FAAwB,CAAA;IACxB,0FAAwB,CAAA;IACxB,0FAAwB,CAAA;IAExB,gEAAgB,CAAA;IAChB,kEAAY,CAAA;IACZ,sEAAc,CAAA;IACd,4EAAiB,CAAA;IACjB,oEAAa,CAAA;IACb,8EAAkB,CAAA;IAClB,gEAAW,CAAA;IACX,4EAAiB,CAAA;IACjB,wDAAO,CAAA;IAEP,gEAAgB,CAAA;IAChB,gEAAW,CAAA;IACX,gEAAW,CAAA;IAEX,oEAAkB,CAAA;IAClB,oEAAa,CAAA;IACb,oEAAa,CAAA;IAEb,sEAAmB,CAAA;IACnB,sEAAc,CAAA;IACd,sEAAc,CAAA;IAEd,kEAAiB,CAAA;IACjB,kEAAY,CAAA;IACZ,kEAAY,CAAA;IAEZ,sEAAmB,CAAA;IACnB,gFAAmB,CAAA;IACnB,gEAAW,CAAA;IACX,oEAAa,CAAA;IAEb,8EAAuB,CAAA;IACvB,8EAAkB,CAAA;IAClB,8EAAkB,CAAA;AACnB,CAAC,EA5CW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QA4CxB;AAsED;;GAEG;AACH,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC9B,wCAAiB,CAAA;IACjB,oCAAa,CAAA;AACd,CAAC,EAHW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAG9B"}
@@ -1,320 +0,0 @@
/**
* Types extracted from https://discord.com/developers/docs/resources/channel
*/
import type { APIPartialEmoji } from './emoji';
import type { APIGuildMember } from './guild';
import type { APIUser } from './user';
/**
* Not documented, but partial only includes id, name, and type
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIPartialChannel {
id: string;
type: ChannelType;
name?: string;
}
/**
* https://discord.com/developers/docs/resources/channel#channel-object-channel-structure
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIChannel extends APIPartialChannel {
guild_id?: string;
position?: number;
permission_overwrites?: APIOverwrite[];
name?: string;
topic?: string | null;
nsfw?: boolean;
last_message_id?: string | null;
bitrate?: number;
user_limit?: number;
rate_limit_per_user?: number;
recipients?: APIUser[];
icon?: string | null;
owner_id?: string;
application_id?: string;
parent_id?: string | null;
last_pin_timestamp?: string | null;
}
/**
* https://discord.com/developers/docs/resources/channel#channel-object-channel-types
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare enum ChannelType {
GUILD_TEXT = 0,
DM = 1,
GUILD_VOICE = 2,
GROUP_DM = 3,
GUILD_CATEGORY = 4,
GUILD_NEWS = 5,
GUILD_STORE = 6
}
/**
* https://discord.com/developers/docs/resources/channel#message-object-message-structure
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIMessage {
id: string;
channel_id: string;
guild_id?: string;
author: APIUser;
member?: APIGuildMember;
content: string;
timestamp: string;
edited_timestamp: string | null;
tts: boolean;
mention_everyone: boolean;
mentions: (APIUser & {
member?: Omit<APIGuildMember, 'user'>;
})[];
mention_roles: string[];
mention_channels?: APIChannelMention[];
attachments: APIAttachment[];
embeds: APIEmbed[];
reactions?: APIReaction[];
nonce?: string | number;
pinned: boolean;
webhook_id?: string;
type: MessageType;
activity?: APIMessageActivity;
application?: APIMessageApplication;
message_reference?: APIMessageReference;
flags?: MessageFlags;
referenced_message?: APIMessage | null;
}
/**
* https://discord.com/developers/docs/resources/channel#message-object-message-types
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare enum MessageType {
DEFAULT = 0,
RECIPIENT_ADD = 1,
RECIPIENT_REMOVE = 2,
CALL = 3,
CHANNEL_NAME_CHANGE = 4,
CHANNEL_ICON_CHANGE = 5,
CHANNEL_PINNED_MESSAGE = 6,
GUILD_MEMBER_JOIN = 7,
USER_PREMIUM_GUILD_SUBSCRIPTION = 8,
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_1 = 9,
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_2 = 10,
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_3 = 11,
CHANNEL_FOLLOW_ADD = 12,
GUILD_DISCOVERY_DISQUALIFIED = 14,
GUILD_DISCOVERY_REQUALIFIED = 15,
GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING = 16,
GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING = 17
}
/**
* https://discord.com/developers/docs/resources/channel#message-object-message-activity-structure
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIMessageActivity {
type: MessageActivityType;
party_id?: string;
}
/**
* https://discord.com/developers/docs/resources/channel#message-object-message-application-structure
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIMessageApplication {
id: string;
cover_image?: string;
description: string;
icon: string | null;
name: string;
}
/**
* https://discord.com/developers/docs/resources/channel#message-object-message-reference-structure
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIMessageReference {
message_id?: string;
channel_id: string;
guild_id?: string;
}
/**
* https://discord.com/developers/docs/resources/channel#message-object-message-activity-types
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare enum MessageActivityType {
JOIN = 1,
SPECTATE = 2,
LISTEN = 3,
JOIN_REQUEST = 5
}
/**
* https://discord.com/developers/docs/resources/channel#message-object-message-flags
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare enum MessageFlags {
CROSSPOSTED = 1,
IS_CROSSPOST = 2,
SUPPRESS_EMBEDS = 4,
SOURCE_MESSAGE_DELETED = 8,
URGENT = 16
}
/**
* https://discord.com/developers/docs/resources/channel#reaction-object-reaction-structure
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIReaction {
count: number;
me: boolean;
emoji: APIPartialEmoji;
}
/**
* https://discord.com/developers/docs/resources/channel#overwrite-object-overwrite-structure
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIOverwrite {
id: string;
type: OverwriteType;
/**
* @deprecated Use `allow_new` instead
*/
allow: number;
allow_new: string;
/**
* @deprecated Use `deny_new` instead
*/
deny: number;
deny_new: string;
}
/**
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare enum OverwriteType {
Member = "member",
Role = "role"
}
/**
* https://discord.com/developers/docs/resources/channel#embed-object-embed-structure
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIEmbed {
title?: string;
/**
* @deprecated *Embed types should be considered deprecated and might be removed in a future API version*
*/
type?: EmbedType;
description?: string;
url?: string;
timestamp?: string;
color?: number;
footer?: APIEmbedFooter;
image?: APIEmbedImage;
thumbnail?: APIEmbedThumbnail;
video?: APIEmbedVideo;
provider?: APIEmbedProvider;
author?: APIEmbedAuthor;
fields?: APIEmbedField[];
}
/**
* https://discord.com/developers/docs/resources/channel#embed-object-embed-types
* @deprecated *Embed types should be considered deprecated and might be removed in a future API version*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export declare enum EmbedType {
Rich = "rich",
Image = "image",
Video = "video",
GifV = "gifv",
Article = "article",
Link = "link"
}
/**
* https://discord.com/developers/docs/resources/channel#embed-object-embed-thumbnail-structure
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIEmbedThumbnail {
url?: string;
proxy_url?: string;
height?: number;
width?: number;
}
/**
* https://discord.com/developers/docs/resources/channel#embed-object-embed-video-structure
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIEmbedVideo {
url?: string;
height?: number;
width?: number;
}
/**
* https://discord.com/developers/docs/resources/channel#embed-object-embed-image-structure
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIEmbedImage {
url?: string;
proxy_url?: string;
height?: number;
width?: number;
}
/**
* https://discord.com/developers/docs/resources/channel#embed-object-embed-provider-structure
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIEmbedProvider {
name?: string;
url?: string;
}
/**
* https://discord.com/developers/docs/resources/channel#embed-object-embed-author-structure
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIEmbedAuthor {
name?: string;
url?: string;
icon_url?: string;
proxy_icon_url?: string;
}
/**
* https://discord.com/developers/docs/resources/channel#embed-object-embed-footer-structure
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIEmbedFooter {
text: string;
icon_url?: string;
proxy_icon_url?: string;
}
/**
* https://discord.com/developers/docs/resources/channel#embed-object-embed-field-structure
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIEmbedField {
name: string;
value: string;
inline?: boolean;
}
/**
* https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIAttachment {
id: string;
filename: string;
size: number;
url: string;
proxy_url: string;
height: number | null;
width: number | null;
}
/**
* https://discord.com/developers/docs/resources/channel#channel-mention-object-channel-mention-structure
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIChannelMention {
id: string;
guild_id: string;
type: ChannelType;
name: string;
}
/**
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIFollowedChannel {
channel_id: string;
webhook_id: string;
}
//# sourceMappingURL=channel.d.ts.map
@@ -1 +0,0 @@
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,UAAW,SAAQ,iBAAiB;IACpD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qBAAqB,CAAC,EAAE,YAAY,EAAE,CAAC;IACv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CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,Line truncated
@@ -1,90 +0,0 @@
"use strict";
/**
* Types extracted from https://discord.com/developers/docs/resources/channel
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.EmbedType = exports.OverwriteType = exports.MessageFlags = exports.MessageActivityType = exports.MessageType = exports.ChannelType = void 0;
/**
* https://discord.com/developers/docs/resources/channel#channel-object-channel-types
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
var ChannelType;
(function (ChannelType) {
ChannelType[ChannelType["GUILD_TEXT"] = 0] = "GUILD_TEXT";
ChannelType[ChannelType["DM"] = 1] = "DM";
ChannelType[ChannelType["GUILD_VOICE"] = 2] = "GUILD_VOICE";
ChannelType[ChannelType["GROUP_DM"] = 3] = "GROUP_DM";
ChannelType[ChannelType["GUILD_CATEGORY"] = 4] = "GUILD_CATEGORY";
ChannelType[ChannelType["GUILD_NEWS"] = 5] = "GUILD_NEWS";
ChannelType[ChannelType["GUILD_STORE"] = 6] = "GUILD_STORE";
})(ChannelType = exports.ChannelType || (exports.ChannelType = {}));
/**
* https://discord.com/developers/docs/resources/channel#message-object-message-types
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
var MessageType;
(function (MessageType) {
MessageType[MessageType["DEFAULT"] = 0] = "DEFAULT";
MessageType[MessageType["RECIPIENT_ADD"] = 1] = "RECIPIENT_ADD";
MessageType[MessageType["RECIPIENT_REMOVE"] = 2] = "RECIPIENT_REMOVE";
MessageType[MessageType["CALL"] = 3] = "CALL";
MessageType[MessageType["CHANNEL_NAME_CHANGE"] = 4] = "CHANNEL_NAME_CHANGE";
MessageType[MessageType["CHANNEL_ICON_CHANGE"] = 5] = "CHANNEL_ICON_CHANGE";
MessageType[MessageType["CHANNEL_PINNED_MESSAGE"] = 6] = "CHANNEL_PINNED_MESSAGE";
MessageType[MessageType["GUILD_MEMBER_JOIN"] = 7] = "GUILD_MEMBER_JOIN";
MessageType[MessageType["USER_PREMIUM_GUILD_SUBSCRIPTION"] = 8] = "USER_PREMIUM_GUILD_SUBSCRIPTION";
MessageType[MessageType["USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_1"] = 9] = "USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_1";
MessageType[MessageType["USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_2"] = 10] = "USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_2";
MessageType[MessageType["USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_3"] = 11] = "USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_3";
MessageType[MessageType["CHANNEL_FOLLOW_ADD"] = 12] = "CHANNEL_FOLLOW_ADD";
MessageType[MessageType["GUILD_DISCOVERY_DISQUALIFIED"] = 14] = "GUILD_DISCOVERY_DISQUALIFIED";
MessageType[MessageType["GUILD_DISCOVERY_REQUALIFIED"] = 15] = "GUILD_DISCOVERY_REQUALIFIED";
MessageType[MessageType["GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING"] = 16] = "GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING";
MessageType[MessageType["GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING"] = 17] = "GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING";
})(MessageType = exports.MessageType || (exports.MessageType = {}));
/**
* https://discord.com/developers/docs/resources/channel#message-object-message-activity-types
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
var MessageActivityType;
(function (MessageActivityType) {
MessageActivityType[MessageActivityType["JOIN"] = 1] = "JOIN";
MessageActivityType[MessageActivityType["SPECTATE"] = 2] = "SPECTATE";
MessageActivityType[MessageActivityType["LISTEN"] = 3] = "LISTEN";
MessageActivityType[MessageActivityType["JOIN_REQUEST"] = 5] = "JOIN_REQUEST";
})(MessageActivityType = exports.MessageActivityType || (exports.MessageActivityType = {}));
/**
* https://discord.com/developers/docs/resources/channel#message-object-message-flags
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
var MessageFlags;
(function (MessageFlags) {
MessageFlags[MessageFlags["CROSSPOSTED"] = 1] = "CROSSPOSTED";
MessageFlags[MessageFlags["IS_CROSSPOST"] = 2] = "IS_CROSSPOST";
MessageFlags[MessageFlags["SUPPRESS_EMBEDS"] = 4] = "SUPPRESS_EMBEDS";
MessageFlags[MessageFlags["SOURCE_MESSAGE_DELETED"] = 8] = "SOURCE_MESSAGE_DELETED";
MessageFlags[MessageFlags["URGENT"] = 16] = "URGENT";
})(MessageFlags = exports.MessageFlags || (exports.MessageFlags = {}));
/**
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
var OverwriteType;
(function (OverwriteType) {
OverwriteType["Member"] = "member";
OverwriteType["Role"] = "role";
})(OverwriteType = exports.OverwriteType || (exports.OverwriteType = {}));
/**
* https://discord.com/developers/docs/resources/channel#embed-object-embed-types
* @deprecated *Embed types should be considered deprecated and might be removed in a future API version*
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
var EmbedType;
(function (EmbedType) {
EmbedType["Rich"] = "rich";
EmbedType["Image"] = "image";
EmbedType["Video"] = "video";
EmbedType["GifV"] = "gifv";
EmbedType["Article"] = "article";
EmbedType["Link"] = "link";
})(EmbedType = exports.EmbedType || (exports.EmbedType = {}));
//# sourceMappingURL=channel.js.map
@@ -1 +0,0 @@
{"version":3,"file":"channel.js","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAuCH;;;GAGG;AACH,IAAY,WAQX;AARD,WAAY,WAAW;IACtB,yDAAc,C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ACpB,0BAAa,CAAA;IACb,4BAAe,CAAA;IACf,4BAAe,CAAA;IACf,0BAAa,CAAA;IACb,gCAAmB,CAAA;IACnB,0BAAa,CAAA;AACd,CAAC,EAPW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAOpB"}
@@ -1,25 +0,0 @@
/**
* Types extracted from https://discord.com/developers/docs/resources/emoji
*/
import type { APIUser } from './user';
/**
* Not documented but mentioned
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIPartialEmoji {
id: string | null;
name: string | null;
animated?: boolean;
}
/**
* https://discord.com/developers/docs/resources/emoji#emoji-object-emoji-structure
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
*/
export interface APIEmoji extends APIPartialEmoji {
roles?: string[];
user?: APIUser;
require_colons?: boolean;
managed?: boolean;
available?: boolean;
}
//# sourceMappingURL=emoji.d.ts.map
@@ -1 +0,0 @@
{"version":3,"file":"emoji.d.ts","sourceRoot":"","sources":["emoji.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC/B,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,QAAS,SAAQ,eAAe;IAChD,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;CACpB"}
@@ -1,6 +0,0 @@
"use strict";
/**
* Types extracted from https://discord.com/developers/docs/resources/emoji
*/
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=emoji.js.map
Loaded 100 of 3735 files, more files were not shown because too many files have changed in this diff. Show more