send anonymous tweets
This commit is contained in:
2 files changed
+20
-7
No files matched your search
+19
-6
@@ -18,6 +18,14 @@ module.exports = {
|
|||||||
type: 3,
|
type: 3,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "use_vpn",
|
||||||
|
description: "Tweet from an anonymous account",
|
||||||
|
value: "use_vpn",
|
||||||
|
type: 3,
|
||||||
|
choices: [{ name: "true", value: "true" }], // this just makes it look like we are enabling it optionally, but all
|
||||||
|
required: false, // we care for is that args[1] exists to send an anonymous tweet.
|
||||||
|
},
|
||||||
],
|
],
|
||||||
SlashCommand: {
|
SlashCommand: {
|
||||||
/**
|
/**
|
||||||
@@ -29,20 +37,25 @@ module.exports = {
|
|||||||
*/
|
*/
|
||||||
run: async (client, interaction, args, { GuildDB }) => {
|
run: async (client, interaction, args, { GuildDB }) => {
|
||||||
if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) {
|
if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) {
|
||||||
return interaction.send(`You are not allowed to use the bot in this channel.`);
|
return interaction.send({ content: `You are not allowed to use the bot in this channel.` });
|
||||||
}
|
}
|
||||||
|
|
||||||
let userID = interaction.member.user.id;
|
const userID = interaction.member.user.id;
|
||||||
let avatar = interaction.member.user.avatar;
|
const avatar = interaction.member.user.avatar;
|
||||||
|
|
||||||
const tweetEmbed = new EmbedBuilder()
|
let tweetEmbed = new EmbedBuilder()
|
||||||
.setColor('#0099ff')
|
.setColor('#0099ff')
|
||||||
.setTitle('New Twitter Notifciation')
|
.setTitle('New Twitter Notifciation')
|
||||||
.setThumbnail('https://static.vecteezy.com/system/resources/previews/002/534/045/original/social-media-twitter-logo-blue-isolated-free-vector.jpg')
|
.setThumbnail('https://static.vecteezy.com/system/resources/previews/002/534/045/original/social-media-twitter-logo-blue-isolated-free-vector.jpg')
|
||||||
.setAuthor({ name: `${interaction.member.user.username}`, iconURL: `https://cdn.discordapp.com/avatars/${userID}/${avatar}.png` })
|
|
||||||
.setDescription(args[0].value)
|
.setDescription(args[0].value)
|
||||||
.setTimestamp()
|
.setTimestamp()
|
||||||
|
|
||||||
|
if (client.exists(args[1])) {
|
||||||
|
tweetEmbed.setAuthor({ name: 'Anonymous', iconURL: 'https://www.pngkey.com/png/detail/230-2301779_best-classified-apps-default-user-profile.png' })
|
||||||
|
} else {
|
||||||
|
tweetEmbed.setAuthor({ name: `${interaction.member.user.username}`, iconURL: `https://cdn.discordapp.com/avatars/${userID}/${avatar}.png` })
|
||||||
|
}
|
||||||
|
|
||||||
if (client.exists(GuildDB.tweetChannel)) {
|
if (client.exists(GuildDB.tweetChannel)) {
|
||||||
const channel = interaction.guild.channels.cache.find(channel => channel.id === GuildDB.tweetChannel);
|
const channel = interaction.guild.channels.cache.find(channel => channel.id === GuildDB.tweetChannel);
|
||||||
if (!channel) {
|
if (!channel) {
|
||||||
@@ -55,7 +68,7 @@ module.exports = {
|
|||||||
try {
|
try {
|
||||||
channel.send({ embeds: [tweetEmbed] });
|
channel.send({ embeds: [tweetEmbed] });
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return interaction.send(`<@${client.user.id}> Does not have permissions to send to the channel.\nMake sure your admins give <@${client.user.id}> access to all channels required. `)
|
return interaction.send({ content: `<@${client.user.id}> Does not have permissions to send to the channel.\nMake sure your admins give <@${client.user.id}> access to all channels required.` })
|
||||||
}
|
}
|
||||||
return interaction.send({ content: 'Tweeted!' });
|
return interaction.send({ content: 'Tweeted!' });
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@ require('dotenv').config();
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
Dev: "PROD.",
|
Dev: "PROD.",
|
||||||
Version: "12.4.5",
|
Version: "12.5.0",
|
||||||
Admins: ["362791661274660874", "329371697570381824"], // Admins of the bot
|
Admins: ["362791661274660874", "329371697570381824"], // Admins of the bot
|
||||||
DefaultPrefix: "?",
|
DefaultPrefix: "?",
|
||||||
ServerID: "955668596745461830",
|
ServerID: "955668596745461830",
|
||||||
|
|||||||
Reference in new issue
Block a user