Skip to content
Snippets Groups Projects
Commit c2288bd6 authored by Reviath's avatar Reviath
Browse files

Deleted interactions.

parent 3b252b30
Branches
No related tags found
No related merge requests found
const config = require('../config.json');
const Discord = require('discord.js');
const multiplexer = require('../multiplexer/getuser');
exports.run = async (client, message, args, connection) => {
const user = message.guild.members.cache.get(multiplexer.GetUser(args[0])) || message.author
const embed = new Discord.MessageEmbed()
.setDescription(`Avatar of ${user.tag}`)
.setImage(user.avatarURL())
......
const config = require('../config.json');
const { GetApp } = require('../multiplexer/getapp');
const interaction_commands = require('../interactions/author');
const Discord = require('discord.js');
module.exports = {
ready: (client) => {
if (config.token == "TOKEN") {
......@@ -16,27 +13,6 @@ module.exports = {
client.user.setActivity({
name: config.presence
});
await GetApp(client).commands.post({
data: {
name: 'author',
description: 'See my author.',
},
});
client.ws.on('INTERACTION_CREATE', async (interaction) => {
const command = interaction.data.name.toLowerCase()
if (command == 'author') {
client.api.interactions(interaction.id, interaction.token).callback.post({
data: {
type: 4,
data: {
embeds: [interaction_commands.author(config, Discord, client)],
},
},
});
};
});
console.log(`Logging in as ${client.user.tag} (${client.user.id})`);
});
}
......
module.exports = {
author: (config, Discord, client) => {
const author = client.users.cache.get(config.owner);
const embed = new Discord.MessageEmbed()
.setTitle("My Author:")
.setDescription(`<@${author.id}> ([${author.tag}](https://discord.com/users/${author.id}))`)
.setColor(0xff8019);
return embed;
}
};
\ No newline at end of file
module.exports = {
GetApp: (client, guildId) => {
const app = client.api.applications(client.user.id)
if (guildId) {
app.guilds(guildId)
};
return app
}
};
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment