Compare commits
No commits in common. "9dd060aa2862fc7389af7819aa00323b486f7d8c" and "92c91928e722edf16d3d3fc72dd0f895de9248c7" have entirely different histories.
9dd060aa28
...
92c91928e7
3 changed files with 1 additions and 105 deletions
|
@ -28,15 +28,10 @@ export default {
|
||||||
if (response.data.children[i].data.over_18 == true && !interaction.channel.nsfw) {
|
if (response.data.children[i].data.over_18 == true && !interaction.channel.nsfw) {
|
||||||
return interaction.editReply('No nsfw');
|
return interaction.editReply('No nsfw');
|
||||||
}
|
}
|
||||||
|
|
||||||
let description = response.data.children[i].data.selftext;
|
|
||||||
if (description === '') {
|
|
||||||
description = 'No description.';
|
|
||||||
}
|
|
||||||
const redditEmbed = new EmbedBuilder()
|
const redditEmbed = new EmbedBuilder()
|
||||||
.setColor(interaction.member ? interaction.member.displayHexColor : 'Navy')
|
.setColor(interaction.member ? interaction.member.displayHexColor : 'Navy')
|
||||||
.setTitle(response.data.children[i].data.title)
|
.setTitle(response.data.children[i].data.title)
|
||||||
.setDescription(description)
|
.setDescription(response.data.children[i].data.selftext)
|
||||||
.setURL('https://reddit.com' + response.data.children[i].data.permalink)
|
.setURL('https://reddit.com' + response.data.children[i].data.permalink)
|
||||||
.setFooter({ text: `/r/${response.data.children[i].data.subreddit} | ⬆ ${response.data.children[i].data.ups} 🗨 ${response.data.children[i].data.num_comments}` });
|
.setFooter({ text: `/r/${response.data.children[i].data.subreddit} | ⬆ ${response.data.children[i].data.ups} 🗨 ${response.data.children[i].data.num_comments}` });
|
||||||
|
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
import { SlashCommandBuilder, EmbedBuilder } from 'discord.js';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
data: new SlashCommandBuilder()
|
|
||||||
.setName('serverinfo')
|
|
||||||
.setDescription('Show info about the server'),
|
|
||||||
category: 'utility',
|
|
||||||
alias: ['server'],
|
|
||||||
async execute(interaction, args, client) {
|
|
||||||
await interaction.guild.members.fetch();
|
|
||||||
const botCount = interaction.guild.members.cache.filter(member => member.user.bot).size;
|
|
||||||
const guildOwner = await client.users.fetch(interaction.guild.ownerId);
|
|
||||||
|
|
||||||
const addEmbed = new EmbedBuilder()
|
|
||||||
.setColor(interaction.member ? interaction.member.displayHexColor : 'NAVY')
|
|
||||||
.setTitle(interaction.guild.name)
|
|
||||||
.setThumbnail(interaction.guild.iconURL())
|
|
||||||
.addFields(
|
|
||||||
{ name: 'Number of users', value: (interaction.guild.memberCount - botCount).toString(), inline: true },
|
|
||||||
{ name: 'Number of bots', value: botCount.toString(), inline: true },
|
|
||||||
{ name: 'Total number of members', value: interaction.guild.memberCount.toString(), inline: true },
|
|
||||||
{ name: 'Number of channels', value: interaction.guild.channels.cache.size.toString(), inline: true },
|
|
||||||
{ name: '', value:'' },
|
|
||||||
{ name: 'Date when guild created', value: interaction.guild.createdAt.toString(), inline: true },
|
|
||||||
{ name: 'Owner', value: guildOwner.toString(), inline: true },
|
|
||||||
)
|
|
||||||
.setTimestamp();
|
|
||||||
|
|
||||||
|
|
||||||
interaction.reply({ embeds: [addEmbed] });
|
|
||||||
|
|
||||||
},
|
|
||||||
};
|
|
|
@ -1,66 +0,0 @@
|
||||||
import { SlashCommandBuilder, EmbedBuilder } from 'discord.js';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
data: new SlashCommandBuilder()
|
|
||||||
.setName('userinfo')
|
|
||||||
.setDescription('Show info about a user')
|
|
||||||
.addMentionableOption(option =>
|
|
||||||
option.setName('user')
|
|
||||||
.setDescription('Which user you want to see the info of?')
|
|
||||||
.setRequired(false)),
|
|
||||||
category: 'utility',
|
|
||||||
alias: ['user'],
|
|
||||||
async execute(interaction, args, client) {
|
|
||||||
await interaction.guild.members.fetch();
|
|
||||||
let member = interaction.member;
|
|
||||||
let user = interaction.user;
|
|
||||||
if (args.user) {
|
|
||||||
user = client.users.resolve(args.user);
|
|
||||||
member = interaction.guild.members.resolve(args.user);
|
|
||||||
}
|
|
||||||
const Embed = new EmbedBuilder()
|
|
||||||
.setColor(member ? member.displayHexColor : 'Navy')
|
|
||||||
.setAuthor({ name: `${user.tag} (${user.id})`, iconURL: user.displayAvatarURL() })
|
|
||||||
.addFields(
|
|
||||||
{ name: 'Current rank hex color', value: member ? member.displayHexColor : 'No rank color', inline: true },
|
|
||||||
{ name: 'Joined guild at', value: member ? member.joinedAt.toString() : 'Not in this guild', inline: true },
|
|
||||||
{ name: 'Date when account created', value: user.createdAt.toString(), inline: true },
|
|
||||||
)
|
|
||||||
.setTimestamp();
|
|
||||||
|
|
||||||
|
|
||||||
Embed.addFields({ name: '', value: '' });
|
|
||||||
|
|
||||||
// Show user status
|
|
||||||
/* Missing presence intent.
|
|
||||||
if (user.presence.activities[0]) {
|
|
||||||
Embed.addField('Presence', user.presence.activities[0], true);
|
|
||||||
if (user.presence.activities[0].details) Embed.addField('', user.presence.activities[0].details, true);
|
|
||||||
if (user.presence.activities[0].state) Embed.addField('', user.presence.activities[0].state, true);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
// Is the user a bot?
|
|
||||||
if (user.bot) Embed.addFields({ name: 'Is a bot?', value: '✅', inline: true });
|
|
||||||
|
|
||||||
// Show on which platform they are using discord from if its not a bot
|
|
||||||
/* Missing presence intent.
|
|
||||||
if (user.presence.clientStatus && !user.bot) {
|
|
||||||
Embed.addFields({ name: '', value: '' });
|
|
||||||
if (user.presence.clientStatus.mobile) Embed.addFields({ name: 'Using discord on', value: '📱 ' + user.presence.clientStatus.mobile, inline: true });
|
|
||||||
if (user.presence.clientStatus.desktop) Embed.addFields({ name: 'Using discord on', value: '💻 ' + user.presence.clientStatus.desktop, inline: true });
|
|
||||||
if (user.presence.clientStatus.web) Embed.addFields({ name: 'Using discord on', value: '☁️ ' + user.presence.clientStatus.web, inline: true });
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (member) {
|
|
||||||
// Show since when this user have been boosting the current guild
|
|
||||||
if (member.premiumSince) Embed.addFields({ name: 'Boosting this guild since', value: member.premiumSince.toString(), inline: true });
|
|
||||||
// Show guild nickname
|
|
||||||
if (member.nickname) Embed.addFields({ name: 'Nickname', value: member.nickname, inline: true });
|
|
||||||
// Show member roles
|
|
||||||
if (member.roles) Embed.addFields({ name: 'Roles', value: `${[...member.roles.cache.values()].join(', ')}` });
|
|
||||||
}
|
|
||||||
|
|
||||||
return interaction.reply({ embeds: [Embed] });
|
|
||||||
},
|
|
||||||
};
|
|
Loading…
Reference in a new issue