tangled
alpha
login
or
join now
isabelroses.com
/
blahaj
1
fork
atom
silly goober bot
1
fork
atom
overview
issues
pulls
pipelines
chore: reduce redundancy
isabelroses.com
2 years ago
be7b627b
42145daa
+1
-46
4 changed files
expand all
collapse all
unified
split
src
commands
userContext
avatar.js
getAvatar.js
userinfo.js
whois.js
+1
-1
src/commands/tools/avatar.js
src/commands/userContext/avatar.js
···
4
data: new SlashCommandBuilder()
5
.setName('avatar')
6
.setDescription('Replies with your avatar!')
7
-
.addUserOption(option => option.setName('target').setDescription('The user\'s avatar to show')),
8
async execute(interaction) {
9
const user = interaction.options.getUser('target');
10
if (!user) {
···
4
data: new SlashCommandBuilder()
5
.setName('avatar')
6
.setDescription('Replies with your avatar!')
7
+
.addUserOption(option => option.setName('target').setDescription('The user\'s avatar to show').setRequired(false)),
8
async execute(interaction) {
9
const user = interaction.options.getUser('target');
10
if (!user) {
src/commands/tools/whois.js
src/commands/userContext/whois.js
-13
src/commands/userContext/getAvatar.js
···
1
-
const { ContextMenuCommandBuilder, ApplicationCommandType } = require('discord.js');
2
-
3
-
module.exports = {
4
-
data: new ContextMenuCommandBuilder()
5
-
.setName('Avatar')
6
-
.setType(ApplicationCommandType.User),
7
-
async execute(interaction) {
8
-
const user = interaction.options.getUser('user');
9
-
await interaction.reply({
10
-
content: user.displayAvatarURL({ dynamic: true })
11
-
});
12
-
}
13
-
};
···
0
0
0
0
0
0
0
0
0
0
0
0
0
-32
src/commands/userContext/userinfo.js
···
1
-
const { ContextMenuCommandBuilder, ApplicationCommandType, EmbedBuilder } = require('discord.js');
2
-
3
-
module.exports = {
4
-
data: new ContextMenuCommandBuilder()
5
-
.setName('User Info')
6
-
.setType(ApplicationCommandType.User),
7
-
async execute(interaction) {
8
-
const user = interaction.options.getUser('user');
9
-
const member = await interaction.guild.members.fetch(user.id);
10
-
const embed = new EmbedBuilder()
11
-
.setTitle(`${user.username}#${user.discriminator}`)
12
-
.setDescription(`ID: ${user.id}`)
13
-
.setColor([255, 255, 255])
14
-
.setThumbnail(user.displayAvatarURL({ dynamic: true }))
15
-
.addFields({ name: 'Created At', value: `<t:${parseInt(user.createdAt / 1000)}:R>`, inline: false })
16
-
.addFields({ name: 'Joined At', value: `<t:${parseInt(member.joinedAt / 1000)}:R>`, inline: true })
17
-
.addFields({ name: 'Bot', value: `${user.bot}`, inline: false })
18
-
.addFields({ name: 'Roles', value: `${member.roles.cache.map(r => r).join(' ')}`, inline: false })
19
-
.setFooter({
20
-
iconURL: user.displayAvatarURL({ dynamic: true }),
21
-
text: user.tag
22
-
})
23
-
.setTimestamp(Date.now())
24
-
.setAuthor({
25
-
name: user.tag,
26
-
iconURL: user.displayAvatarURL({ dynamic: true })
27
-
});
28
-
await interaction.reply({
29
-
embeds: [embed]
30
-
});
31
-
}
32
-
};
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0