Compare commits

...

2 commits

Author SHA1 Message Date
Gonçalo Pereira
fbdf26ff7a Add discordapp invite filter 2022-10-31 12:13:54 +00:00
Gonçalo Pereira
7833a41ffd Add string literal fixes 2022-10-31 12:13:09 +00:00
13 changed files with 30 additions and 30 deletions

View file

@ -7,7 +7,7 @@ export default {
.setDescription('Set a leave message') .setDescription('Set a leave message')
.addStringOption(option => .addStringOption(option =>
option.setName('message') option.setName('message')
.setDescription('The message you want the bot to say when someone leave in the current channel.')), .setDescription('The message you want the bot to say when someone leaves the server, in the current channel.')),
category: 'admin', category: 'admin',
userPermissions: [PermissionFlagsBits.ManageChannels], userPermissions: [PermissionFlagsBits.ManageChannels],
async execute(interaction, args, client) { async execute(interaction, args, client) {

View file

@ -7,7 +7,7 @@ export default {
.setDescription('Set a join message') .setDescription('Set a join message')
.addStringOption(option => .addStringOption(option =>
option.setName('message') option.setName('message')
.setDescription('The message you want the bot to say when someone join in the current channel.')), .setDescription('The message you want the bot to say when someone joins the server, in the current channel.')),
category: 'admin', category: 'admin',
userPermissions: [PermissionFlagsBits.ManageChannels], userPermissions: [PermissionFlagsBits.ManageChannels],
async execute(interaction, args, client) { async execute(interaction, args, client) {

View file

@ -26,7 +26,7 @@ export default {
} }
const i = Math.floor((Math.random() * response.data.children.length)); const i = Math.floor((Math.random() * response.data.children.length));
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('Uh oh! This is a NSFW subreddit! Try again in a NSFW channel!');
} }
let description = response.data.children[i].data.selftext; let description = response.data.children[i].data.selftext;

View file

@ -14,10 +14,10 @@ const Blacklists = db.Blacklists;
export default { export default {
data: new SlashCommandBuilder() data: new SlashCommandBuilder()
.setName('tweet') .setName('tweet')
.setDescription('Send tweet from Haha yes twitter account. Please do not use it for advertisement and keep it english') .setDescription('Send tweet from Haha yes twitter account. Please do not use it for advertisement and keep it in English!')
.addStringOption(option => .addStringOption(option =>
option.setName('content') option.setName('content')
.setDescription('The content of the tweet you want to send me.') .setDescription('The content of the tweet you want me to send.')
.setRequired(false)) .setRequired(false))
.addAttachmentOption(option => .addAttachmentOption(option =>
option.setName('image') option.setName('image')
@ -39,7 +39,7 @@ export default {
const date = new Date(); const date = new Date();
// If account is less than 6 months old don't accept the tweet ( alt prevention ) // If account is less than 6 months old don't accept the tweet ( alt prevention )
if (interaction.user.createdAt > date.setMonth(date.getMonth() - 6)) { if (interaction.user.createdAt > date.setMonth(date.getMonth() - 6)) {
await interaction.editReply({ content: 'Your account is too new to be able to use this command!' }); await interaction.editReply({ content: 'Your Discord account is too new to be able to use this command!' });
return; return;
} }
@ -48,7 +48,7 @@ export default {
// If account is less than 1 year old don't accept attachment // If account is less than 1 year old don't accept attachment
if (attachment && interaction.user.createdAt > date.setFullYear(date.getFullYear() - 1)) { if (attachment && interaction.user.createdAt > date.setFullYear(date.getFullYear() - 1)) {
await interaction.editReply({ content: 'Your account need to be 1 year or older to be able to send attachment!' }); await interaction.editReply({ content: 'Your Discord account needs to be 1 year or older to be able to send attachments!' });
return; return;
} }
@ -73,8 +73,8 @@ export default {
return; return;
} }
// Do not allow discord invites // Do not allow discord invites
if (tweet.includes('discord.gg') || tweet.includes('discord.com/invite/')) { if (tweet.includes('discord.gg') || tweet.includes('discord.com/invite/') || tweet.includes('discordapp.com/invite/')) {
await interaction.editReply({ content: 'No discord invite allowed.' }); await interaction.editReply({ content: 'No discord invites allowed.' });
return; return;
} }
} }
@ -110,7 +110,7 @@ export default {
if (err) { if (err) {
console.log('OH NO AN ERROR!!!!!!!'); console.log('OH NO AN ERROR!!!!!!!');
console.error(err); console.error(err);
return interaction.editReply({ content: 'OH NO!!! AN ERROR HAS occurred!!! please hold on while i find what\'s causing this issue! ' }); return interaction.editReply({ content: 'OH NO!!! AN ERROR HAS OCCURRED!!! Please hold on while I find what\'s causing this issue! ' });
} }
else { else {
Tweet(data); Tweet(data);
@ -163,7 +163,7 @@ export default {
if (err.code == 326) return interaction.editReply({ content: err.interaction }); if (err.code == 326) return interaction.editReply({ content: err.interaction });
console.error('OH NO!!!!'); console.error('OH NO!!!!');
console.error(err); console.error(err);
return interaction.editReply({ content: 'OH NO!!! AN ERROR HAS occurred!!! please hold on while i find what\'s causing this issue!' }); return interaction.editReply({ content: 'OH NO!!! AN ERROR HAS OCCURRED!!! Please hold on while I find what\'s causing this issue!' });
} }
const tweetid = response.id_str; const tweetid = response.id_str;

View file

@ -12,7 +12,7 @@ export default {
.setDescription('Generate a YTP') .setDescription('Generate a YTP')
.addBooleanOption(option => .addBooleanOption(option =>
option.setName('force') option.setName('force')
.setDescription('Force the generation of the video in non-nsfw channel.') .setDescription('Force the generation of the video in a non-NSFW channel.')
.setRequired(false)), .setRequired(false)),
category: 'fun', category: 'fun',
async execute(interaction, args) { async execute(interaction, args) {
@ -39,7 +39,7 @@ export default {
} }
} }
const loadingmsg = await interaction.reply(`Processing, this can take a ***long*** time, i'll ping you when I finished <a:loadingmin:527579785212329984>\nSome info: There are currently ${mp4.length} videos, why not add yours? You can do so with the \`\`addytp\`\` command.\nLike ytp? Why not check out https://ytp.namejeff.xyz/`); const loadingmsg = await interaction.reply(`Processing, this can take a ***long*** time, I'll ping you when it's finished <a:loadingmin:527579785212329984>\nSome info: There are currently ${mp4.length} videos, why not add yours? You can do so with the \`\`addytp\`\` command.\nLike ytp? Why not check out https://ytp.namejeff.xyz/`);
const options = { const options = {
debug: false, debug: false,
@ -75,7 +75,7 @@ export default {
new YTPGenerator().configurateAndGo(options) new YTPGenerator().configurateAndGo(options)
.then(() => { .then(() => {
loadingmsg.delete(); loadingmsg.delete();
return interaction.reply({ content: 'Here is your YTP! Remember, it might contain nsfw, so be careful!', files: [`${os.tmpdir()}/${interaction.id}_YTP.mp4`] }) return interaction.reply({ content: 'Here is your YTP! Remember, it might contain NSFW content, so be careful!', files: [`${os.tmpdir()}/${interaction.id}_YTP.mp4`] })
.catch(err => { .catch(err => {
console.error(err); console.error(err);
return interaction.reply('Whoops, look like the vid might be too big for discord, my bad, please try again'); return interaction.reply('Whoops, look like the vid might be too big for discord, my bad, please try again');

View file

@ -9,7 +9,7 @@ export default {
.setDescription('Delete a tweet') .setDescription('Delete a tweet')
.addStringOption(option => .addStringOption(option =>
option.setName('tweetid') option.setName('tweetid')
.setDescription('The id of the tweet you wish to delete.') .setDescription('The ID of the tweet you wish to delete.')
.setRequired(true)), .setRequired(true)),
category: 'owner', category: 'owner',
ownerOnly: true, ownerOnly: true,
@ -26,7 +26,7 @@ export default {
T.post('statuses/destroy', { T.post('statuses/destroy', {
id: args.tweetid, id: args.tweetid,
}); });
return interaction.editReply('Tweet have been deleted!'); return interaction.editReply('Tweet has been deleted!');
} }
catch (err) { catch (err) {
console.error(err); console.error(err);

View file

@ -38,10 +38,10 @@ export default {
if (args.somethingelse) { if (args.somethingelse) {
if (owned.id === client.user.id) { if (owned.id === client.user.id) {
return interaction.reply('You really thought you could own me?, pathetic...'); return interaction.reply('You really thought you could own me? Pathetic...');
} }
else if (owned.id === ownerId) { else if (owned.id === ownerId) {
return interaction.reply('You really thought you could own him?, pathetic...'); return interaction.reply('You really thought you could own him? Pathetic...');
} }
else if (owned.id === '286054184623538177' || owned.id === '172112210863194113') { else if (owned.id === '286054184623538177' || owned.id === '172112210863194113') {
owned = interaction.user; owned = interaction.user;
@ -70,7 +70,7 @@ export default {
.then(() => interaction.reply(`sucessfully fart pissed on ${member.user.username} <:youngtroll:488559163832795136>`)) .then(() => interaction.reply(`sucessfully fart pissed on ${member.user.username} <:youngtroll:488559163832795136>`))
.catch((error) => { .catch((error) => {
if (process.env.NODE_ENV === 'development') console.error(error); if (process.env.NODE_ENV === 'development') console.error(error);
interaction.reply(`Sorry i could not fart piss on ${member.user.username} :(`); interaction.reply(`Sorry, I could not fart piss on ${member.user.username} :(`);
}); });
@ -80,7 +80,7 @@ export default {
.then(() => interaction.reply('sucessfully fart pissed on you <:youngtroll:488559163832795136>')) .then(() => interaction.reply('sucessfully fart pissed on you <:youngtroll:488559163832795136>'))
.catch((error) => { .catch((error) => {
if (process.env.NODE_ENV === 'development') console.error(error); if (process.env.NODE_ENV === 'development') console.error(error);
interaction.reply('Sorry i could not fart piss on you :('); interaction.reply('Sorry, I could not fart piss on you :(');
}); });
} }
default: default:

View file

@ -13,7 +13,7 @@ export default {
.setDescription('Download a video.') .setDescription('Download a video.')
.addStringOption(option => .addStringOption(option =>
option.setName('url') option.setName('url')
.setDescription('url of the video you want to download.') .setDescription('URL of the video you want to download.')
.setRequired(true)) .setRequired(true))
.addBooleanOption(option => .addBooleanOption(option =>
option.setName('format') option.setName('format')

View file

@ -27,7 +27,7 @@ export default {
// Don't let new account use this command to prevent spam // Don't let new account use this command to prevent spam
const date = new Date(); const date = new Date();
if (interaction.user.createdAt > date.setDate(date.getDate() - 7)) { if (interaction.user.createdAt > date.setDate(date.getDate() - 7)) {
return interaction.reply({ content: '❌ Your account is too new to be able to use this command!', ephemeral: true }); return interaction.reply({ content: '❌ Your Discord account is too new to be able to use this command!', ephemeral: true });
} }
const channel = interaction.client.channels.resolve(feedbackChannelId); const channel = interaction.client.channels.resolve(feedbackChannelId);
@ -37,6 +37,6 @@ export default {
else { else {
channel.send({ embeds: [Embed] }); channel.send({ embeds: [Embed] });
} }
await interaction.reply({ content: 'Your feedback has been sent! Don\'t forget to have dm open if you want to get an answer from the dev!', ephemeral: true }); await interaction.reply({ content: 'Your feedback has been sent! Don\'t forget to have DMs open if you want to get an answer from the dev!', ephemeral: true });
}, },
}; };

View file

@ -12,7 +12,7 @@ export default {
if (!isOptOut) { if (!isOptOut) {
const body = { userID: interaction.user.id }; const body = { userID: interaction.user.id };
await db.optout.create(body); await db.optout.create(body);
return await interaction.reply({ content: 'You have successfully been opt out.' }); return await interaction.reply({ content: 'You have successfully been opted out.' });
} }
const row = new ActionRowBuilder() const row = new ActionRowBuilder()
@ -29,7 +29,7 @@ export default {
.setStyle(ButtonStyle.Danger), .setStyle(ButtonStyle.Danger),
); );
await interaction.reply({ content: 'You are already opt out, do you wish to opt in?', components: [row] }); await interaction.reply({ content: 'You are already opted out, do you wish to opt in?', components: [row] });
client.on('interactionCreate', async (interactionMenu) => { client.on('interactionCreate', async (interactionMenu) => {
if (interaction.user !== interactionMenu.user) return; if (interaction.user !== interactionMenu.user) return;
@ -37,7 +37,7 @@ export default {
interactionMenu.update({ components: [] }); interactionMenu.update({ components: [] });
if (interactionMenu.customId === `yes${interaction.user.id}`) { if (interactionMenu.customId === `yes${interaction.user.id}`) {
await db.optout.destroy({ where: { userID: interaction.user.id } }); await db.optout.destroy({ where: { userID: interaction.user.id } });
return interaction.editReply('You have successfully been opt in'); return interaction.editReply('You have successfully been opted in');
} }
else { else {
return interaction.editReply('Nothing has been changed.'); return interaction.editReply('Nothing has been changed.');

View file

@ -33,7 +33,7 @@ export default {
if (error) { if (error) {
console.error(stderr); console.error(stderr);
console.error(error); console.error(error);
return interaction.editReply('Oh no! an error has occurred!'); return interaction.editReply('Oh no! An error has occurred!');
} }
return interaction.editReply({ files: [file] }); return interaction.editReply({ files: [file] });

View file

@ -1,4 +1,4 @@
[ [
"ETH adresse: 0x9F3FB51e4C295d774a0861b9D6796D12525dD81d", "ETH address: 0x9F3FB51e4C295d774a0861b9D6796D12525dD81d",
"XMR adresse: 87PdPzX6u2nE1ucHDKQtGk2BE2zS42LwPS886KHUqCPoK5TDfkgnin4ZByb3zw5F5acYvbFWcjC83CJWVB6bXkfjAhkJkqU" "XMR address: 87PdPzX6u2nE1ucHDKQtGk2BE2zS42LwPS886KHUqCPoK5TDfkgnin4ZByb3zw5F5acYvbFWcjC83CJWVB6bXkfjAhkJkqU"
] ]