ESLint and spelling

imgbot
Kieran 2022-09-10 09:32:54 +01:00
parent 2fd3414e63
commit 49239fae01
39 changed files with 6613 additions and 942 deletions

21
.eslintrc.json Normal file
View File

@ -0,0 +1,21 @@
{
"extends": ["airbnb-base", "plugin:prettier/recommended"],
"plugins": ["prettier"],
"parserOptions": {
"ecmaVersion": 2018
},
"rules": {
"prettier/prettier": "error",
"no-unused-vars": "warn",
"no-console": "off",
"func-names": "off",
"no-process-exit": "off",
"object-shorthand": "off",
"class-methods-use-this": "off",
"eqeqeq": "off",
"node/no-unsupported-features/es-syntax": "off",
"consistent-return": "off",
"no-plusplus": "off",
"no-underscore-dangle": "off"
}
}

6
.prettierrc Normal file
View File

@ -0,0 +1,6 @@
{
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"useTabs": true
}

28
cspell.json Normal file
View File

@ -0,0 +1,28 @@
{
"words": [
"ACWPing",
"addemoji",
"courserep",
"dockerhub",
"freeside",
"gorb",
"gorbcelebration",
"gorbchristmas",
"gorbcs",
"gorblarge",
"gorbstorm",
"guildmember",
"Hullcss",
"Jetbrains",
"Kieran",
"kieranr",
"lampadaferens",
"nukepaid",
"organising",
"Ouroboros",
"paidmember",
"robsoc",
"usefullinks",
"welcomechannel"
]
}

5560
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -4,14 +4,27 @@
"description": "",
"main": "src/index.js",
"scripts": {
"start": "node src/index.js"
"start": "node src/index.js",
"lint": "eslint . --fix",
"spell": "cspell src/**/"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@discordjs/builders": "^1.2.0",
"discord-api-types": "^0.37.8",
"discord.js": "^13.10.2",
"dotenv": "^16.0.1",
"glob": "^7.2.3"
},
"devDependencies": {
"cspell": "^6.8.1",
"eslint": "^8.23.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-prettier": "^4.2.1",
"prettier": "^2.7.1"
}
}

View File

@ -1,35 +1,45 @@
const { Message, Client, Permissions } = require("discord.js");
const Discord = require('discord.js')
/* eslint-disable no-restricted-syntax */
const { Permissions } = require('discord.js');
const Discord = require('discord.js');
module.exports = {
name: "addemoji",
aliases: [''],
/**
*
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message, args) => {
if(!message.member.permissions.has(Permissions.FLAGS.MANAGE_EMOJIS_AND_STICKERS, Permissions.FLAGS.ADMINISTRATOR))
message.channel.send("You don't have permission to use that command.");
else {
if (!args.length) return message.channel('Please specify an emoji!!')
name: 'addemoji',
aliases: [''],
/**
*
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message, args) => {
if (
!message.member.permissions.has(
Permissions.FLAGS.MANAGE_EMOJIS_AND_STICKERS,
Permissions.FLAGS.ADMINISTRATOR
)
)
message.channel.send("You don't have permission to use that command.");
else {
if (!args.length) return message.channel('Please specify an emoji!!');
for (const emojis of args) {
const getEmoji = Discord.Util.parseEmoji(emojis);
if (getEmoji.id) {
const emojiExt = getEmoji.animated ? ".gif" : ".png";
const emojiURL = `https://cdn.discordapp.com/emojis/${getEmoji.id + emojiExt}`
message.guild.emojis.create(emojiURL, getEmoji.name).then(emoji =>
message.channel.send(`Successfully added: ${emoji} - ${emoji.name} to the server!!`))
}
}
for (const emojis of args) {
const getEmoji = Discord.Util.parseEmoji(emojis);
if (getEmoji.id) {
const emojiExt = getEmoji.animated ? '.gif' : '.png';
const emojiURL = `https://cdn.discordapp.com/emojis/${
getEmoji.id + emojiExt
}`;
};
}
}
message.guild.emojis
.create(emojiURL, getEmoji.name)
.then((emoji) =>
message.channel.send(
`Successfully added: ${emoji} - ${emoji.name} to the server!!`
)
);
}
}
}
},
};

View File

@ -1,20 +1,26 @@
const { Client, Message, Permissions } = require('discord.js');
const { Permissions } = require('discord.js');
module.exports = {
name: 'lock',
aliases: [''],
/**
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async(client, message, args) => {
name: 'lock',
aliases: [''],
/**
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message) => {
const permission = message.member.permissions.has(
Permissions.FLAGS.MANAGE_CHANNELS
);
if (!permission)
return message.reply({
contents: "You don't have permission to use this command",
});
const permission = message.member.permissions.has(Permissions.FLAGS.MANAGE_CHANNELS)
if (!permission)return message.reply({ contents: "You don't have permission to use this command" });
message.channel.permissionOverwrites.edit(message.guild.roles.everyone.id, {SEND_MESSAGES: false});
message.channel.permissionOverwrites.edit(message.guild.roles.everyone.id, {
SEND_MESSAGES: false,
});
message.channel.send("Channel has been locked.")
}
}
message.channel.send('Channel has been locked.');
},
};

View File

@ -1,26 +1,23 @@
const { Client, Message } = require('discord.js');
module.exports = {
name: 'nukepaid',
aliases: [''],
/**
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async(client, message, args) => {
const role = message.guild.roles.cache.get("427878753008353292");
message.guild.roles.create({
data: {
name: role.name,
color: role.color,
hoist: role.hoist,
position: role.position,
permissions: role.permissions,
mentionable: role.mentionable
}
})
role.delete('I had to.')
}
}
name: 'nukepaid',
aliases: [''],
/**
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message) => {
const role = message.guild.roles.cache.get('427878753008353292');
message.guild.roles.create({
data: {
name: role.name,
color: role.color,
hoist: role.hoist,
position: role.position,
permissions: role.permissions,
mentionable: role.mentionable,
},
});
role.delete('I had to.');
},
};

View File

@ -1,18 +1,24 @@
const { Client, Message, Permissions } = require('discord.js');
const { Permissions } = require('discord.js');
module.exports = {
name: 'unlock',
aliases: [''],
/**
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async(client, message, args) => {
const permission = message.member.permissions.has(Permissions.FLAGS.MANAGE_CHANNELS)
if (!permission)return message.reply({ contents: "You don't have permission to use this command" });
message.channel.permissionOverwrites.edit(message.guild.roles.everyone.id, {SEND_MESSAGES: true});
message.channel.send("Channel has been unlocked.")
}
}
name: 'unlock',
aliases: [''],
/**
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message) => {
const permission = message.member.permissions.has(
Permissions.FLAGS.MANAGE_CHANNELS
);
if (!permission)
return message.reply({
contents: "You don't have permission to use this command",
});
message.channel.permissionOverwrites.edit(message.guild.roles.everyone.id, {
SEND_MESSAGES: true,
});
message.channel.send('Channel has been unlocked.');
},
};

View File

@ -1,42 +1,59 @@
const {MessageEmbed, MessageActionRow, MessageButton } = require("discord.js");
const {
MessageEmbed,
MessageActionRow,
MessageButton,
Permissions,
} = require('discord.js');
module.exports = {
name: "paidmember",
aliases: [''],
/**
*
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message, args) => {
name: 'paidmember',
aliases: [''],
/**
*
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message) => {
if (
!message.member.permissions.has(
Permissions.FLAGS.BAN_MEMBERS,
Permissions.FLAGS.ADMINISTRATOR
)
)
return message.channel.send(
"You don't have permission to use that command."
);
if(!message.member.permissions.has(Permissions.FLAGS.BAN_MEMBERS, Permissions.FLAGS.ADMINISTRATOR)) return message.channel.send("You don't have permission to use that command.")
const embed = new MessageEmbed()
.setColor('GREEN')
.setFooter({ text: `Called By: ${message.author.tag}` })
.setTimestamp()
.setTitle('Paid Member!')
.setDescription(
`Press the button below to get access to the paid member role.`
)
.addField(
'Benefits?',
'Come to every event\r\n Vote in AGMs and EGMs\r\n Access a special area, just for paid members\r\n Access our archive of previous events and guest talks\r\n\r\nAnd support the society you are apart of!'
)
.addField('Pay for a membership', 'Press the grey button below!')
.setThumbnail('https://i.imgur.com/ww6wKwJ.png');
const embed = new MessageEmbed()
.setColor('GREEN')
.setFooter({ text: `Called By: ${message.author.tag}`})
.setTimestamp()
.setTitle("Paid Member!")
.setDescription(`Press the button below to get access to the paid member role.`)
.addField('Benefits?', 'Come to every event\r\n Vote in AGMs and EGMs\r\n Access a special area, just for paid members\r\n Access our archive of previous events and guest talks\r\n\r\nAnd support the society you are apart of!')
.addField('Pay for a membership', 'Press the grey button below!')
.setThumbnail('https://i.imgur.com/ww6wKwJ.png')
const row = new MessageActionRow()
.addComponents(
new MessageButton()
.setURL('https://hulluniunion.com/shop?aid=304')
.setEmoji('')
.setLabel('Pay for a membership!')
.setStyle('LINK')
)
.addComponents(
new MessageButton()
.setCustomId('paidModal')
.setLabel('Paid Member Request')
.setStyle('PRIMARY')
)
message.channel.send({ embeds: [embed], components: [row] })
},
};
const row = new MessageActionRow()
.addComponents(
new MessageButton()
.setURL('https://hulluniunion.com/shop?aid=304')
.setEmoji('')
.setLabel('Pay for a membership!')
.setStyle('LINK')
)
.addComponents(
new MessageButton()
.setCustomId('paidModal')
.setLabel('Paid Member Request')
.setStyle('PRIMARY')
);
message.channel.send({ embeds: [embed], components: [row] });
},
};

View File

@ -1,39 +1,53 @@
const { MessageEmbed, MessageActionRow, MessageButton } = require("discord.js");
const { MessageEmbed } = require('discord.js');
module.exports = {
name: "usefullinks",
aliases: [''],
/**
*
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message, args) => {
const embed = new MessageEmbed()
.setColor('GREEN')
.setFooter({ text: `Called By: ${message.author.tag}`})
.setTimestamp()
.setTitle("Useful Links!")
.setDescription(`Below are a some useful links to communities and resources.`)
.setThumbnail('https://i.imgur.com/ww6wKwJ.png')
name: 'usefullinks',
aliases: [''],
/**
*
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message) => {
const embed = new MessageEmbed()
.setColor('GREEN')
.setFooter({ text: `Called By: ${message.author.tag}` })
.setTimestamp()
.setTitle('Useful Links!')
.setDescription(
`Below are a some useful links to communities and resources.`
)
.setThumbnail('https://i.imgur.com/ww6wKwJ.png')
.addField('Free Stuff', `
.addField(
'Free Stuff',
`
- GitHub Student Developer Pack: https://education.github.com/pack\r\n
- Microsoft Azure Dev Tools for Teaching: https://azure.microsoft.com/en-gb/free/students/\r\n
- Jetbrains IDE Package: https://www.jetbrains.com/community/education/#students\r\n`)
- Jetbrains IDE Package: https://www.jetbrains.com/community/education/#students\r\n`
)
.addField('University of Hull Specific Features', `
.addField(
'University of Hull Specific Features',
`
- Freeside Student Resource List: https://github.com/FreesideHull/StudentResources\r\n
- Hull University Buddy: https://chrome.google.com/webstore/detail/hull-university-buddy/jnppmhcoifoohipnnhdabhnolnilncbk\r\n`)
- Hull University Buddy: https://chrome.google.com/webstore/detail/hull-university-buddy/jnppmhcoifoohipnnhdabhnolnilncbk\r\n`
)
.addField('Other Communities', `
.addField(
'Other Communities',
`
- Freeside: https://freeside.co.uk/\r\n
- Unofficial University of Hull Discord Server: https://discord.gg/rm7r5wbYq2\r\n
- The Programmer's Hangout: https://discord.gg/programming\r\n`)
- The Programmer's Hangout: https://discord.gg/programming\r\n`
)
.addField(`Want to add a resource?`, `Message an <@&427866208726155274> with your suggestion for consideration!`)
message.channel.send({ embeds: [embed] })
},
.addField(
`Want to add a resource?`,
`Message an <@&427866208726155274> with your suggestion for consideration!`
);
message.channel.send({ embeds: [embed] });
},
};

View File

@ -1,43 +1,54 @@
const { MessageEmbed, MessageActionRow, MessageButton } = require("discord.js");
const { MessageEmbed, MessageActionRow, MessageButton } = require('discord.js');
module.exports = {
name: "welcome",
aliases: [''],
/**
*
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message, args) => {
const embed = new MessageEmbed()
.setColor('GREEN')
.setFooter({ text: `Called By: ${message.author.tag}`})
.setTimestamp()
.setTitle("Welcome!")
.setDescription(`We're the official student-run Computer Science Society at Hull, set up with the aim of providing engaging events for students with an interest in Computer Science. This basically means our role is to make life outside of your course as fun and interesting as possible, organising both social and technical events for you.`)
.setThumbnail('https://i.imgur.com/ww6wKwJ.png')
.addField('Exec Members', `President - <@261607869068214272>.\r\nSecretary - <@265925073926488064>.\r\nTreasurer - <@354324259629170700>.\r\nSocial Secretary - NA.\r\n Publicity Officer - <@328928794364870656>.\r\nWebmaster - <@449573875743981569>.\r\n\r\n\r\n`)
.addField('Our Site', `https://hullcss.org/`)
.addField('Gain Access', `To gain access to the server, you will need to have a read of the code of conduct, found here: https://github.com/hullcss/conduct/ and react to the check mark below.\r\n \r\n **All Members, including Community are required to read this policy to access the server.**`)
.addField('Confirmation', 'By reacting with the check mark, you confirm that you have read the #hullcss Code of Conduct')
name: 'welcome',
aliases: [''],
/**
*
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message) => {
const embed = new MessageEmbed()
.setColor('GREEN')
.setFooter({ text: `Called By: ${message.author.tag}` })
.setTimestamp()
.setTitle('Welcome!')
.setDescription(
`We're the official student-run Computer Science Society at Hull, set up with the aim of providing engaging events for students with an interest in Computer Science. This basically means our role is to make life outside of your course as fun and interesting as possible, organising both social and technical events for you.`
)
.setThumbnail('https://i.imgur.com/ww6wKwJ.png')
.addField(
'Exec Members',
`President - <@261607869068214272>.\r\nSecretary - <@265925073926488064>.\r\nTreasurer - <@354324259629170700>.\r\nSocial Secretary - NA.\r\n Publicity Officer - <@328928794364870656>.\r\nWebmaster - <@449573875743981569>.\r\n\r\n\r\n`
)
.addField('Our Site', `https://hullcss.org/`)
.addField(
'Gain Access',
`To gain access to the server, you will need to have a read of the code of conduct, found here: https://github.com/hullcss/conduct/ and react to the check mark below.\r\n \r\n **All Members, including Community are required to read this policy to access the server.**`
)
.addField(
'Confirmation',
'By reacting with the check mark, you confirm that you have read the #hullcss Code of Conduct'
);
const row = new MessageActionRow()
const row = new MessageActionRow()
.addComponents(
new MessageButton()
.setURL('https://github.com/hullcss/conduct/')
.setEmoji('')
.setLabel('Code of Conduct')
.setStyle('LINK')
)
.addComponents(
new MessageButton()
.setCustomId('codeOfConduct')
.setEmoji('✅')
.setLabel(' I have read the code of conduct!')
.setStyle('SUCCESS')
)
.setURL('https://github.com/hullcss/conduct/')
.setEmoji('')
.setLabel('Code of Conduct')
.setStyle('LINK')
)
.addComponents(
new MessageButton()
.setCustomId('codeOfConduct')
.setEmoji('✅')
.setLabel(' I have read the code of conduct!')
.setStyle('SUCCESS')
);
message.channel.send({ embeds: [embed], components: [row] })
},
message.channel.send({ embeds: [embed], components: [row] });
},
};

View File

@ -1,33 +1,30 @@
const { Message, Client, MessageEmbed } = require("discord.js");
const { MessageEmbed } = require('discord.js');
module.exports = {
name: "8ball",
aliases: ['8b'],
/**
*
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message, args) => {
const Responses = [
"Yes",
"No",
"Maybe",
"It is likely",
"It is unlikely"
];
name: '8ball',
aliases: ['8b'],
/**
*
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message, args) => {
const Responses = ['Yes', 'No', 'Maybe', 'It is likely', 'It is unlikely'];
let messageArgs = args.join(' ');
if (!messageArgs[1]) return message.reply('Please specify a topic.');
const messageArgs = args.join(' ');
if (!messageArgs[1]) return message.reply('Please specify a topic.');
const embed = new MessageEmbed()
.setColor('GREEN')
.setFooter({ text: `Called By: ${message.author.tag}`})
.setTimestamp()
.setTitle("8Ball")
.addField(`${messageArgs}`,`${Responses[Math.floor(Math.random() * Responses.length)]}`)
message.channel.send({ embeds: [embed] })
},
const embed = new MessageEmbed()
.setColor('GREEN')
.setFooter({ text: `Called By: ${message.author.tag}` })
.setTimestamp()
.setTitle('8Ball')
.addField(
`${messageArgs}`,
`${Responses[Math.floor(Math.random() * Responses.length)]}`
);
message.channel.send({ embeds: [embed] });
},
};

View File

@ -1,38 +1,34 @@
module.exports = {
name: "gorb",
aliases: [''],
/**
*
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message, args) => {
if(!args[0]){
message.channel.send({ files: ['./images/gorb.jpg'] })
}
if(args[0] === 'cs'){
message.channel.send({ files: ['./images/gorbcs.jpg'] })
}
name: 'gorb',
aliases: [''],
/**
*
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message, args) => {
if (!args[0]) {
message.channel.send({ files: ['./images/gorb.jpg'] });
}
if (args[0] === 'cs') {
message.channel.send({ files: ['./images/gorbcs.jpg'] });
}
if(args[0] === 'party'){
message.channel.send({ files: ['./images/gorbcelebration.PNG'] })
}
if (args[0] === 'party') {
message.channel.send({ files: ['./images/gorbcelebration.PNG'] });
}
if(args[0] === 'christmas'){
message.channel.send({ files: ['./images/gorbchristmas.PNG'] })
}
if (args[0] === 'christmas') {
message.channel.send({ files: ['./images/gorbchristmas.PNG'] });
}
if(args[0] === 'storm'){
message.channel.send({ files: ['./images/gorbstorm.PNG'] })
}
if (args[0] === 'storm') {
message.channel.send({ files: ['./images/gorbstorm.PNG'] });
}
if(args[0] == 'large'){
message.channel.send({ files: ['./images/gorblarge.png'] })
}
},
};
if (args[0] == 'large') {
message.channel.send({ files: ['./images/gorblarge.png'] });
}
},
};

View File

@ -1,13 +1,15 @@
module.exports = {
name: "lampadaferens",
aliases: [''],
/**
*
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message, args) => {
message.channel.send('https://th.bing.com/th/id/R.b938157fa7b152a1109aede2091f6b72?rik=%2f3u0RlNpTY1JDw&pid=ImgRaw&r=0')
},
};
name: 'lampadaferens',
aliases: [''],
/**
*
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message) => {
message.channel.send(
'https://th.bing.com/th/id/R.b938157fa7b152a1109aede2091f6b72?rik=%2f3u0RlNpTY1JDw&pid=ImgRaw&r=0'
);
},
};

View File

@ -1,20 +1,23 @@
const { MessageEmbed } = require("discord.js");
const { MessageEmbed } = require('discord.js');
module.exports = {
name: "buy",
aliases: ['paid'],
/**
*
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message, args) => {
const embed = new MessageEmbed()
.setTitle("Thanks for considering to become a paid member!")
.setColor('GREEN')
.setFooter({text: `Called By: ${message.author.tag}`})
.addField('You can purchase from below!','https://hulluniunion.com/shop?aid=304')
message.channel.send({ embeds: [embed] });
}
}
name: 'buy',
aliases: ['paid'],
/**
*
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message) => {
const embed = new MessageEmbed()
.setTitle('Thanks for considering to become a paid member!')
.setColor('GREEN')
.setFooter({ text: `Called By: ${message.author.tag}` })
.addField(
'You can purchase from below!',
'https://hulluniunion.com/shop?aid=304'
);
message.channel.send({ embeds: [embed] });
},
};

View File

@ -1,21 +1,26 @@
const { MessageEmbed } = require("discord.js");
const { MessageEmbed } = require('discord.js');
module.exports = {
name: "freeside",
aliases: ['fs'],
/**
*
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message, args) => {
const embed = new MessageEmbed()
.setTitle("Freeside")
.setColor('ORANGE')
.setFooter({ text: `Called By: ${message.author.tag}`})
.setDescription('Freeside is the student run and maintained linux cluster within the University Of Hull Computer Science Department providing Linux administration experience, mentoring and technical advice alongside other peer-led support. It is completely free to all students to join, irrespective of degree pathway.')
.addField('You can join them from below!','https://discord.freeside.co.uk')
message.channel.send({ embeds: [embed] });
}
}
name: 'freeside',
aliases: ['fs'],
/**
*
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message) => {
const embed = new MessageEmbed()
.setTitle('Freeside')
.setColor('ORANGE')
.setFooter({ text: `Called By: ${message.author.tag}` })
.setDescription(
'Freeside is the student run and maintained linux cluster within the University Of Hull Computer Science Department providing Linux administration experience, mentoring and technical advice alongside other peer-led support. It is completely free to all students to join, irrespective of degree pathway.'
)
.addField(
'You can join them from below!',
'https://discord.freeside.co.uk'
);
message.channel.send({ embeds: [embed] });
},
};

View File

@ -1,81 +1,73 @@
const discord = require("discord.js");
const discord = require('discord.js');
module.exports = {
name: "help",
aliases: [''],
/**
*
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message, args) => {
name: 'help',
aliases: [''],
/**
*
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message, args) => {
if (!args[0]) {
const embed = new discord.MessageEmbed()
.setTitle('HullCSS Help')
.setDescription(
'You can use `!help <category>` to get additional commands within a specific category'
)
.setColor('GREEN')
if(!args[0]){
const embed = new discord.MessageEmbed()
.setTitle("HullCSS Help")
.setDescription("You can use `!help <category>` to get additional commands within a specific category")
.setColor('GREEN')
.addField('❓`!help`','This Command', true)
.addField('🛠️`!help admin`','Displays Admin Commands!', true)
.addField(' `!help general`', 'Displays General Commands!', true)
.addField('🎉`!help fun`', 'Displays Fun Commands!', true)
.addField('🐹 `!help gorb`', 'Displays Gorb Commands', true)
message.channel.send({ embeds: [embed] });
}
if(args[0] === 'admin'){
const embed = new discord.MessageEmbed()
.setTitle("Admin Commands")
.setColor('GREEN')
.addField('❓`!help`', 'This Command', true)
.addField('🛠️`!help admin`', 'Displays Admin Commands!', true)
.addField(' `!help general`', 'Displays General Commands!', true)
.addField('🎉`!help fun`', 'Displays Fun Commands!', true)
.addField('🐹 `!help gorb`', 'Displays Gorb Commands', true);
message.channel.send({ embeds: [embed] });
}
if (args[0] === 'admin') {
const embed = new discord.MessageEmbed()
.setTitle('Admin Commands')
.setColor('GREEN');
message.channel.send({ embeds: [embed] });
}
message.channel.send({ embeds: [embed] });
}
if(args[0] === 'general'){
const embed = new discord.MessageEmbed()
.setTitle("General Commands")
.setColor('GREEN')
if (args[0] === 'general') {
const embed = new discord.MessageEmbed()
.setTitle('General Commands')
.setColor('GREEN')
.addField('!buy', 'Sends a link to purchase membership')
.addField('!links', 'Get all the links')
.addField('!freeside', 'A link to the Freeside discord server')
.addField('!robsoc', 'A link to the Robotics Society discord server')
.addField('!buy', 'Sends a link to purchase membership')
.addField('!links', 'Get all the links')
.addField('!freeside', 'A link to the Freeside discord server')
.addField('!robsoc', 'A link to the Robotics Society discord server');
message.channel.send({ embeds: [embed] });
}
if(args[0] === 'fun'){
const embed = new discord.MessageEmbed()
.setTitle("Fun Commands")
.setColor('GREEN')
message.channel.send({ embeds: [embed] });
}
.addField('!8ball', 'Answer your deepest questions.')
.addField('!gorb', 'guinea pig orb')
.addField('!torch', 'Light the way')
message.channel.send({ embeds: [embed] });
}
if(args[0] === 'gorb'){
const embed = new discord.MessageEmbed()
.setTitle("Gorb Commands")
.setColor('GREEN')
.addField('!gorb cs', 'CS Gorb')
.addField('!gorb party', 'Party Gorb')
.addField('!gorb christmas', 'Christmas Gorb')
.addField('!gorb storm', 'Storm Gorb')
message.channel.send({ embeds: [embed] });
}
}
}
if (args[0] === 'fun') {
const embed = new discord.MessageEmbed()
.setTitle('Fun Commands')
.setColor('GREEN')
.addField('!8ball', 'Answer your deepest questions.')
.addField('!gorb', 'guinea pig orb')
.addField('!torch', 'Light the way');
message.channel.send({ embeds: [embed] });
}
if (args[0] === 'gorb') {
const embed = new discord.MessageEmbed()
.setTitle('Gorb Commands')
.setColor('GREEN')
.addField('!gorb cs', 'CS Gorb')
.addField('!gorb party', 'Party Gorb')
.addField('!gorb christmas', 'Christmas Gorb')
.addField('!gorb storm', 'Storm Gorb');
message.channel.send({ embeds: [embed] });
}
},
};

View File

@ -1,22 +1,20 @@
const { MessageEmbed } = require("discord.js");
const { MessageEmbed } = require('discord.js');
module.exports = {
name: "links",
aliases: [''],
/**
*
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message, args) => {
const embed = new MessageEmbed()
.setTitle("Links!")
.setColor('GREEN')
.setFooter({ text: `Called By: ${message.author.tag}`})
.addField('Find us here:','https://hullcss.org')
message.channel.send({ embeds: [embed] });
},
name: 'links',
aliases: [''],
/**
*
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message) => {
const embed = new MessageEmbed()
.setTitle('Links!')
.setColor('GREEN')
.setFooter({ text: `Called By: ${message.author.tag}` })
.addField('Find us here:', 'https://hullcss.org');
message.channel.send({ embeds: [embed] });
},
};

View File

@ -1,31 +1,32 @@
const { Message, Client, MessageEmbed } = require("discord.js");
const { MessageEmbed } = require('discord.js');
module.exports = {
name: "ping",
aliases: ['p'],
/**
*
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message, args) => {
let days = Math.floor(client.uptime / 86400000);
let hours = Math.floor(client.uptime / 3600000) % 24;
let minutes = Math.floor(client.uptime / 60000) % 60;
let seconds = Math.floor(client.uptime / 1000) % 60;
name: 'ping',
aliases: ['p'],
/**
*
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message) => {
const days = Math.floor(client.uptime / 86400000);
const hours = Math.floor(client.uptime / 3600000) % 24;
const minutes = Math.floor(client.uptime / 60000) % 60;
const seconds = Math.floor(client.uptime / 1000) % 60;
const embed = new MessageEmbed()
.setColor('GREEN')
.setFooter({ text: `Called By: ${message.author.tag}`})
.setTimestamp()
.setTitle("Pong!")
.setDescription(`${client.ws.ping} ping to host`)
.addField('Uptime', ` ${days}days ${hours}hrs ${minutes}min ${seconds}sec`, true)
const embed = new MessageEmbed()
.setColor('GREEN')
.setFooter({ text: `Called By: ${message.author.tag}` })
.setTimestamp()
.setTitle('Pong!')
.setDescription(`${client.ws.ping} ping to host`)
.addField(
'Uptime',
` ${days}days ${hours}hrs ${minutes}min ${seconds}sec`,
true
);
message.channel.send({ embeds: [embed] })
},
message.channel.send({ embeds: [embed] });
},
};

View File

@ -1,21 +1,26 @@
const { MessageEmbed } = require("discord.js");
const { MessageEmbed } = require('discord.js');
module.exports = {
name: "robotics",
aliases: ['robsoc'],
/**
*
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message, args) => {
const embed = new MessageEmbed()
.setTitle("Robotics Society")
.setColor('BLUE')
.setFooter({ text: `Called By: ${message.author.tag}`})
.setDescription('Robotics Society aee a society where you can gain skills in building an actual robot, or get help with your assignments or exams, but they also run social night where they go out to do stuff.')
.addField('You can join them from below!','https://discord.gg/cMP5CavnK4')
message.channel.send({ embeds: [embed] });
}
}
name: 'robotics',
aliases: ['robsoc'],
/**
*
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message) => {
const embed = new MessageEmbed()
.setTitle('Robotics Society')
.setColor('BLUE')
.setFooter({ text: `Called By: ${message.author.tag}` })
.setDescription(
'Robotics Society aee a society where you can gain skills in building an actual robot, or get help with your assignments or exams, but they also run social night where they go out to do stuff.'
)
.addField(
'You can join them from below!',
'https://discord.gg/cMP5CavnK4'
);
message.channel.send({ embeds: [embed] });
},
};

View File

@ -1,42 +1,42 @@
const { Message, Client, MessageActionRow, MessageSelectMenu } = require("discord.js");
const { MessageActionRow, MessageSelectMenu } = require('discord.js');
module.exports = {
name: "bcs",
aliases: [''],
/**
*
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message, args) => {
const row3 = new MessageActionRow()
.addComponents(
new MessageSelectMenu()
.setCustomId("bcsSelect")
.setPlaceholder("Select your BCS Status")
.addOptions([
{
label:"Student Member",
value:"bcsStudent",
},
{
label:"Associate Member",
value:"bcsAss",
name: 'bcs',
aliases: [''],
/**
*
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message) => {
const row3 = new MessageActionRow().addComponents(
new MessageSelectMenu()
.setCustomId('bcsSelect')
.setPlaceholder('Select your BCS Status')
.addOptions([
{
label: 'Student Member',
value: 'bcsStudent',
},
{
label: 'Associate Member',
value: 'bcsAss',
},
{
label: 'Professional Member',
value: 'bcsProf',
},
{
label: 'Fellow',
value: 'bcsFellow',
},
])
);
},
{
label:"Professional Member",
value:"bcsProf",
},
{
label:"Fellow",
value:"bcsFellow",
},
])
)
message.channel.send({content: "Select your BCS status", components:[row3]})
}
}
message.channel.send({
content: 'Select your BCS status',
components: [row3],
});
},
};

View File

@ -1,41 +1,39 @@
const { Message, Client, MessageActionRow, MessageSelectMenu } = require("discord.js");
const { MessageActionRow, MessageSelectMenu } = require('discord.js');
module.exports = {
name: "roles",
aliases: [''],
/**
*
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message, args) => {
name: 'roles',
aliases: [''],
/**
*
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message) => {
const row4 = new MessageActionRow().addComponents(
new MessageSelectMenu()
.setCustomId('miscSelect')
.setPlaceholder('Select your misc roles')
.setMinValues(0)
.setMaxValues(2)
.addOptions([
{
label: 'Course Rep',
description: 'Get access to the course rep channel',
value: 'courserep',
},
{
label: 'CourseWork Help Ping',
description:
'If you want to help out within our coursework-help channel',
value: 'ACWPing',
},
])
);
const row4 = new MessageActionRow()
.addComponents(
new MessageSelectMenu()
.setCustomId("miscSelect")
.setPlaceholder("Select your misc roles")
.setMinValues(0)
.setMaxValues(2)
.addOptions([
{
label:"Course Rep",
description:"Get access to the course rep channel",
value:"courserep",
},
{
label:"CourseWork Help Ping",
description:"If you want to help out within our coursework-help channel",
value:"ACWPing",
},
])
)
message.channel.send({content: "Select your Misc roles", components:[row4]})
},
};
message.channel.send({
content: 'Select your Misc roles',
components: [row4],
});
},
};

View File

@ -1,56 +1,56 @@
const { Message, Client, MessageActionRow, MessageSelectMenu } = require("discord.js");
const { MessageActionRow, MessageSelectMenu } = require('discord.js');
module.exports = {
name: "pronouns",
aliases: [''],
/**
*
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message, args) => {
const row2 = new MessageActionRow()
.addComponents(
new MessageSelectMenu()
.setCustomId("pronounSelect")
.setPlaceholder("Select your pronouns")
.setMinValues(0)
.setMaxValues(7)
.addOptions([
{
label:"He/Him",
value:"HeHim",
},
{
label:"He/They",
value:"HeThey",
name: 'pronouns',
aliases: [''],
/**
*
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message) => {
const row2 = new MessageActionRow().addComponents(
new MessageSelectMenu()
.setCustomId('pronounSelect')
.setPlaceholder('Select your pronouns')
.setMinValues(0)
.setMaxValues(7)
.addOptions([
{
label: 'He/Him',
value: 'HeHim',
},
{
label: 'He/They',
value: 'HeThey',
},
{
label: 'She/Her',
value: 'SheHer',
},
{
label: 'She/They',
value: 'SheThey',
},
{
label: 'They/Them',
value: 'TheyThem',
},
{
label: 'Any Pronouns',
value: 'Any',
},
{
label: 'Ask My Pronouns',
value: 'Ask',
},
])
);
},
{
label:"She/Her",
value:"SheHer",
},
{
label:"She/They",
value:"SheThey",
},
{
label:"They/Them",
value:"TheyThem",
},
{
label:"Any Pronouns",
value:"Any",
},
{
label:"Ask My Pronouns",
value:"Ask",
},
])
)
message.channel.send({content: "Select your pronouns.", components:[row2]})
}
}
message.channel.send({
content: 'Select your pronouns.',
components: [row2],
});
},
};

View File

@ -1,57 +1,54 @@
const { Message, Client, MessageActionRow, MessageSelectMenu } = require("discord.js");
const { MessageActionRow, MessageSelectMenu } = require('discord.js');
module.exports = {
name: "years",
aliases: [''],
/**
*
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message, args) => {
const row1 = new MessageActionRow()
.addComponents(
new MessageSelectMenu()
.setCustomId("yearSelect")
.setPlaceholder("Select your current year")
.addOptions([
{
label:"Foundation",
value:"0",
},
{
label:"First Year",
value:"1",
},
{
label:"Second Year",
value:"2",
},
{
label:"Year In Industry",
value:"3",
},
{
label:"Third Year",
value:"4",
},
{
label:"Masters",
value:"5",
},
{
label:"PhD",
value:"6",
},
{
label:"Graduate",
value:"7",
},
])
)
message.channel.send({content: "Select your year.", components:[row1]})
}
}
name: 'years',
aliases: [''],
/**
*
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async (client, message) => {
const row1 = new MessageActionRow().addComponents(
new MessageSelectMenu()
.setCustomId('yearSelect')
.setPlaceholder('Select your current year')
.addOptions([
{
label: 'Foundation',
value: '0',
},
{
label: 'First Year',
value: '1',
},
{
label: 'Second Year',
value: '2',
},
{
label: 'Year In Industry',
value: '3',
},
{
label: 'Third Year',
value: '4',
},
{
label: 'Masters',
value: '5',
},
{
label: 'PhD',
value: '6',
},
{
label: 'Graduate',
value: '7',
},
])
);
message.channel.send({ content: 'Select your year.', components: [row1] });
},
};

View File

@ -1,12 +1,12 @@
const client = require("../index");
const client = require('../index');
client.on('guildMemberAdd', async (guildmember) =>{
const welcomechannel = client.channels.cache.get('427875246801027072')
const guild = client.guilds.cache.get('427865794467069962');
client.on('guildMemberAdd', async (guildmember) => {
const welcomechannel = client.channels.cache.get('427875246801027072');
const guild = client.guilds.cache.get('427865794467069962');
if(guild == guildmember.guild.id )
{
welcomechannel.send({ content: `<a:WavingHand:973689926258393169> Welcome! **${guildmember.user}** has just joined the server! Grab some roles from <#427873938333499404> and let us know who you are within <#427874873898041346>`})
}
})
if (guild == guildmember.guild.id) {
welcomechannel.send({
content: `<a:WavingHand:973689926258393169> Welcome! **${guildmember.user}** has just joined the server! Grab some roles from <#427873938333499404> and let us know who you are within <#427874873898041346>`,
});
}
});

View File

@ -1,36 +1,50 @@
const client = require("../index");
const { MessageEmbed } = require('discord.js');
const { time } = require("@discordjs/builders");
const client = require('../index');
client.on('guildScheduledEventCreate', async guildScheduledEvent =>{
const channel = client.channels.cache.get('973686987787751534')
const embed = new MessageEmbed()
.setTitle(guildScheduledEvent.name)
.setDescription(guildScheduledEvent.description)
.setColor('GREEN')
if(interaction.user.tag !== null)
{
embed.setFooter({text: `Created by ${guildScheduledEvent.creator.tag}`})
client.on('guildScheduledEventCreate', async (guildScheduledEvent) => {
const channel = client.channels.cache.get('973686987787751534');
const embed = new MessageEmbed()
.setTitle(guildScheduledEvent.name)
.setDescription(guildScheduledEvent.description)
.setColor('GREEN');
if (guildScheduledEvent.user.tag !== null) {
embed.setFooter({ text: `Created by ${guildScheduledEvent.creator.tag}` });
}
embed.setTimestamp()
embed.setImage(`https://cdn.discordapp.com/guild-events/${guildScheduledEvent.id}/${guildScheduledEvent.image}.png?size=2048`)
embed.setTimestamp();
embed.setImage(
`https://cdn.discordapp.com/guild-events/${guildScheduledEvent.id}/${guildScheduledEvent.image}.png?size=2048`
);
if(guildScheduledEvent.entityType !== 'EXTERNAL')
{
embed.addField('Location', `${guildScheduledEvent.channel.name} - [Link](https://discordapp.com/channels/427865794467069962/${guildScheduledEvent.channelId})`)
}
else
{
embed.addField('Location', `External - ${guildScheduledEvent.entityMetadata.location}`)
}
if (guildScheduledEvent.entityType !== 'EXTERNAL') {
embed.addField(
'Location',
`${guildScheduledEvent.channel.name} - [Link](https://discordapp.com/channels/427865794467069962/${guildScheduledEvent.channelId})`
);
} else {
embed.addField(
'Location',
`External - ${guildScheduledEvent.entityMetadata.location}`
);
}
embed.addField('Start Date and Time', `${guildScheduledEvent.scheduledStartAt.toLocaleString('en-UK', { timeZone: "Europe/London" })}`, true)
if(guildScheduledEvent.scheduledEndAt !== null)
{
embed.addField('End Date and Time', `${guildScheduledEvent.scheduledStartAt.toLocaleString('en-UK', { timeZone: "Europe/London" })}`, true)
}
embed.addField('InviteURL', `${guildScheduledEvent.url}`)
embed.addField(
'Start Date and Time',
`${guildScheduledEvent.scheduledStartAt.toLocaleString('en-UK', {
timeZone: 'Europe/London',
})}`,
true
);
if (guildScheduledEvent.scheduledEndAt !== null) {
embed.addField(
'End Date and Time',
`${guildScheduledEvent.scheduledStartAt.toLocaleString('en-UK', {
timeZone: 'Europe/London',
})}`,
true
);
}
channel.send({ embeds: [embed]})
})
embed.addField('InviteURL', `${guildScheduledEvent.url}`);
channel.send({ embeds: [embed] });
});

View File

@ -1,21 +1,20 @@
const client = require("../index");
const client = require('../index');
client.on('ready', () => {
console.log('HullCSS is online')
console.log('HullCSS is online');
const Activities = [
"Hullcss.org",
"Slash Commands",
];
const Activities = ['Hullcss.org', 'Slash Commands'];
setInterval(() =>{
client.user.setActivity(Activities[Math.floor(Math.random() * Activities.length)], {type:"WATCHING"})
}, 180000);
setInterval(() => {
client.user.setActivity(
Activities[Math.floor(Math.random() * Activities.length)],
{ type: 'WATCHING' }
);
}, 180000);
setInterval(() =>{
const memberCount = client.guilds.cache.get('427865794467069962').memberCount
const channel = client.channels.cache.get('906167542249308160');
channel.setName(`Discord Members: ${memberCount.toLocaleString()}`);
}, 600000);
})
setInterval(() => {
const { memberCount } = client.guilds.cache.get('427865794467069962');
const channel = client.channels.cache.get('906167542249308160');
channel.setName(`Discord Members: ${memberCount.toLocaleString()}`);
}, 600000);
});

View File

@ -1,8 +1,8 @@
const { Client, Collection } = require("discord.js");
require("dotenv").config();
const { Client, Collection } = require('discord.js');
require('dotenv').config();
const client = new Client({
intents: 98819,
intents: 98819,
});
module.exports = client;
@ -11,6 +11,6 @@ client.commands = new Collection();
client.slashCommands = new Collection();
// Initializing the project
require("./handler")(client);
require('./handler')(client);
client.login(process.env.DISCORD_TOKEN);
client.login(process.env.DISCORD_TOKEN);

View File

@ -1,26 +1,35 @@
const { Client, CommandInteraction, Permissions } = require("discord.js");
const { Permissions } = require('discord.js');
const { SlashCommandBuilder } = require('@discordjs/builders');
const { PermissionFlagsBits } = require('discord-api-types/v10');
module.exports = {
...new SlashCommandBuilder()
.setName('lock')
.setDescription('Lock a channel')
.setDefaultMemberPermissions(PermissionFlagsBits.KickMembers | PermissionFlagsBits.BanMembers),
...new SlashCommandBuilder()
.setName('lock')
.setDescription('Lock a channel')
.setDefaultMemberPermissions(
PermissionFlagsBits.KickMembers || PermissionFlagsBits.BanMembers
),
/**
*
* @param {Client} client
* @param {CommandInteraction} interaction
* @param {String[]} args
*/
run: async (client, interaction, args) => {
/**
*
* @param {Client} client
* @param {CommandInteraction} interaction
* @param {String[]} args
*/
const permission = interaction.member.permissions.has(Permissions.FLAGS.MANAGE_CHANNELS)
if (!permission)return interaction.reply({ contents: "You don't have permission to use this command", ephemeral: true });
interaction.channel.permissionOverwrites.edit(interaction.guild.roles.everyone.id, {SEND_MESSAGES: false});
interaction.reply("Channel has been locked.")
},
};
run: async (client, interaction) => {
const permission = interaction.member.permissions.has(
Permissions.FLAGS.MANAGE_CHANNELS
);
if (!permission)
return interaction.reply({
contents: "You don't have permission to use this command",
ephemeral: true,
});
interaction.channel.permissionOverwrites.edit(
interaction.guild.roles.everyone.id,
{ SEND_MESSAGES: false }
);
interaction.reply('Channel has been locked.');
},
};

View File

@ -1,25 +1,33 @@
const { Client, CommandInteraction, Permissions } = require("discord.js");
const { Permissions } = require('discord.js');
const { SlashCommandBuilder } = require('@discordjs/builders');
const { PermissionFlagsBits } = require('discord-api-types/v10');
module.exports = {
...new SlashCommandBuilder()
.setName('unlock')
.setDescription('Unlock a channel')
.setDefaultMemberPermissions(PermissionFlagsBits.KickMembers | PermissionFlagsBits.BanMembers),
/**
*
* @param {Client} client
* @param {CommandInteraction} interaction
* @param {String[]} args
*/
run: async (client, interaction, args) => {
const permission = interaction.member.permissions.has(Permissions.FLAGS.MANAGE_CHANNELS)
if (!permission)return interaction.reply({ contents: "You don't have permission to use this command", ephemeral: true });
interaction.channel.permissionOverwrites.edit(interaction.guild.roles.everyone.id, {SEND_MESSAGES: true});
interaction.reply("Channel has been unlocked.")
},
};
...new SlashCommandBuilder()
.setName('unlock')
.setDescription('Unlock a channel')
.setDefaultMemberPermissions(
PermissionFlagsBits.KickMembers || PermissionFlagsBits.BanMembers
),
/**
*
* @param {Client} client
* @param {CommandInteraction} interaction
* @param {String[]} args
*/
run: async (client, interaction) => {
const permission = interaction.member.permissions.has(
Permissions.FLAGS.MANAGE_CHANNELS
);
if (!permission)
return interaction.reply({
contents: "You don't have permission to use this command",
ephemeral: true,
});
interaction.channel.permissionOverwrites.edit(
interaction.guild.roles.everyone.id,
{ SEND_MESSAGES: true }
);
interaction.reply('Channel has been unlocked.');
},
};

View File

@ -1,41 +1,38 @@
const { Client, CommandInteraction, MessageEmbed } = require("discord.js");
const { MessageEmbed } = require('discord.js');
const { SlashCommandBuilder } = require('@discordjs/builders');
module.exports = {
...new SlashCommandBuilder()
.setName('8ball')
.setDescription('Answer your deepest questions')
.addStringOption((option) => option
.setName('question')
.setDescription("Your question")
.setRequired(true)
),
...new SlashCommandBuilder()
.setName('8ball')
.setDescription('Answer your deepest questions')
.addStringOption((option) =>
option
.setName('question')
.setDescription('Your question')
.setRequired(true)
),
/**
*
* @param {Client} client
* @param {CommandInteraction} interaction
* @param {String[]} args
*/
/**
*
* @param {Client} client
* @param {CommandInteraction} interaction
* @param {String[]} args
*/
run: async (client, interaction, args) => {
const questionToSend = interaction.options.getString("question")
run: async (client, interaction) => {
const questionToSend = interaction.options.getString('question');
const Responses = [
"Yes",
"No",
"Maybe",
"It is likely",
"It is unlikely"
];
const Responses = ['Yes', 'No', 'Maybe', 'It is likely', 'It is unlikely'];
const embed = new MessageEmbed()
.setColor('GREEN')
.setFooter({ text: `Called By: ${interaction.user.tag}`})
.setTimestamp()
.setTitle("8ball")
.addField(`${questionToSend}`,`${Responses[Math.floor(Math.random() * Responses.length)]}`)
interaction.reply({ embeds: [embed]});
},
};
const embed = new MessageEmbed()
.setColor('GREEN')
.setFooter({ text: `Called By: ${interaction.user.tag}` })
.setTimestamp()
.setTitle('8ball')
.addField(
`${questionToSend}`,
`${Responses[Math.floor(Math.random() * Responses.length)]}`
);
interaction.reply({ embeds: [embed] });
},
};

View File

@ -1,56 +1,53 @@
const { Client, CommandInteraction } = require("discord.js");
const { SlashCommandBuilder } = require('@discordjs/builders');
module.exports = {
...new SlashCommandBuilder()
.setName('gorb')
.setDescription('Gorb')
.addStringOption(option =>
option
.setName('type')
.setDescription('The gorb type')
.addChoices(
{ name: 'Christmas', value: 'christmas' },
{ name: 'Party', value: 'party' },
{ name: 'Computer Science', value: 'cs' },
{ name: 'Large', value: 'large' },
{ name: 'Storm', value: 'storm' },
)),
...new SlashCommandBuilder()
.setName('gorb')
.setDescription('Gorb')
.addStringOption((option) =>
option
.setName('type')
.setDescription('The gorb type')
.addChoices(
{ name: 'Christmas', value: 'christmas' },
{ name: 'Party', value: 'party' },
{ name: 'Computer Science', value: 'cs' },
{ name: 'Large', value: 'large' },
{ name: 'Storm', value: 'storm' }
)
),
/**
*
* @param {Client} client
* @param {CommandInteraction} interaction
* @param {String[]} args
*/
run: async (client, interaction, args) => {
const string = interaction.options.getString('type');
/**
*
* @param {Client} client
* @param {CommandInteraction} interaction
* @param {String[]} args
*/
run: async (client, interaction) => {
const string = interaction.options.getString('type');
if(string == null){
await interaction.reply({ files: ['./images/gorb.jpg'] })
}
if(string == 'cs'){
await interaction.reply({ files: ['./images/gorbcs.jpg'] })
}
if (string == null) {
await interaction.reply({ files: ['./images/gorb.jpg'] });
}
if(string == 'party'){
await interaction.reply({ files: ['./images/gorbcelebration.PNG'] })
}
if (string == 'cs') {
await interaction.reply({ files: ['./images/gorbcs.jpg'] });
}
if(string == 'christmas'){
await interaction.reply({ files: ['./images/gorbchristmas.PNG'] })
}
if(string == 'storm'){
await interaction.reply({ files: ['./images/gorbstorm.PNG'] })
}
if (string == 'party') {
await interaction.reply({ files: ['./images/gorbcelebration.PNG'] });
}
if(string == 'large'){
await interaction.reply({ files: ['./images/gorblarge.png'] })
}
if (string == 'christmas') {
await interaction.reply({ files: ['./images/gorbchristmas.PNG'] });
}
if (string == 'storm') {
await interaction.reply({ files: ['./images/gorbstorm.PNG'] });
}
},
};
if (string == 'large') {
await interaction.reply({ files: ['./images/gorblarge.png'] });
}
},
};

View File

@ -1,16 +1,18 @@
const { Client, CommandInteraction } = require("discord.js");
module.exports = {
name: "lampadaferens",
description: "Hull University",
type: 'CHAT_INPUT',
/**
*
* @param {Client} client
* @param {CommandInteraction} interaction
* @param {String[]} args
*/
run: async (client, interaction, args) => {
interaction.reply({ files: ['https://c.tenor.com/N8A8lQ3g0YIAAAAd/chaseatlanticgifs-sarahmcfadyen.gif'] });
},
};
name: 'lampadaferens',
description: 'Hull University',
type: 'CHAT_INPUT',
/**
*
* @param {Client} client
* @param {CommandInteraction} interaction
* @param {String[]} args
*/
run: async (client, interaction) => {
interaction.reply({
files: [
'https://c.tenor.com/N8A8lQ3g0YIAAAAd/chaseatlanticgifs-sarahmcfadyen.gif',
],
});
},
};

View File

@ -1,22 +1,24 @@
const { Client, CommandInteraction, MessageEmbed } = require("discord.js");
const { MessageEmbed } = require('discord.js');
module.exports = {
name: "buy",
description: "returns membership purchase link",
type: 'CHAT_INPUT',
/**
*
* @param {Client} client
* @param {CommandInteraction} interaction
* @param {String[]} args
*/
run: async (client, interaction, args) => {
const embed = new MessageEmbed()
.setTitle("Thanks for considering to become a paid member!")
.setColor('GREEN')
.setFooter({ text: `Called By: ${interaction.user.tag}`})
.addField('You can purchase from below!','https://hulluniunion.com/shop?aid=304')
interaction.reply({ embeds: [embed] });
},
name: 'buy',
description: 'returns membership purchase link',
type: 'CHAT_INPUT',
/**
*
* @param {Client} client
* @param {CommandInteraction} interaction
* @param {String[]} args
*/
run: async (client, interaction) => {
const embed = new MessageEmbed()
.setTitle('Thanks for considering to become a paid member!')
.setColor('GREEN')
.setFooter({ text: `Called By: ${interaction.user.tag}` })
.addField(
'You can purchase from below!',
'https://hulluniunion.com/shop?aid=304'
);
interaction.reply({ embeds: [embed] });
},
};

View File

@ -1,22 +1,27 @@
const { Client, CommandInteraction, MessageEmbed } = require("discord.js");
const { MessageEmbed } = require('discord.js');
module.exports = {
name: "freeside",
description: "returns freeside discord link",
type: 'CHAT_INPUT',
/**
*
* @param {Client} client
* @param {CommandInteraction} interaction
* @param {String[]} args
*/
run: async (client, interaction, args) => {
const embed = new MessageEmbed()
.setTitle("Freeside")
.setColor('ORANGE')
.setFooter({ text: `Called By: ${interaction.user.tag}`})
.setDescription('Freeside is the student run and maintained linux cluster within the University Of Hull Computer Science Department providing Linux administration experience, mentoring and technical advice alongside other peer-led support. It is completely free to all students to join, irrespective of degree pathway.')
.addField('You can join them from below!','https://discord.freeside.co.uk')
interaction.reply({ embeds: [embed] });
},
name: 'freeside',
description: 'returns freeside discord link',
type: 'CHAT_INPUT',
/**
*
* @param {Client} client
* @param {CommandInteraction} interaction
* @param {String[]} args
*/
run: async (client, interaction) => {
const embed = new MessageEmbed()
.setTitle('Freeside')
.setColor('ORANGE')
.setFooter({ text: `Called By: ${interaction.user.tag}` })
.setDescription(
'Freeside is the student run and maintained linux cluster within the University Of Hull Computer Science Department providing Linux administration experience, mentoring and technical advice alongside other peer-led support. It is completely free to all students to join, irrespective of degree pathway.'
)
.addField(
'You can join them from below!',
'https://discord.freeside.co.uk'
);
interaction.reply({ embeds: [embed] });
},
};

View File

@ -1,21 +1,21 @@
const { Client, CommandInteraction, MessageEmbed } = require("discord.js");
const { MessageEmbed } = require('discord.js');
module.exports = {
name: "links",
description: "returns links of Hullcss",
type: 'CHAT_INPUT',
/**
*
* @param {Client} client
* @param {CommandInteraction} interaction
* @param {String[]} args
*/
run: async (client, interaction, args) => {
const embed = new MessageEmbed()
.setTitle("Links!")
.setColor('GREEN')
.setFooter({ text: `Called By: ${interaction.user.tag}`})
.addField('Find us here:','https://hullcss.org')
interaction.reply({ embeds: [embed]});
},
name: 'links',
description: 'returns links of HullCSS',
type: 'CHAT_INPUT',
/**
*
* @param {Client} client
* @param {CommandInteraction} interaction
* @param {String[]} args
*/
run: async (client, interaction) => {
const embed = new MessageEmbed()
.setTitle('Links!')
.setColor('GREEN')
.setFooter({ text: `Called By: ${interaction.user.tag}` })
.addField('Find us here:', 'https://hullcss.org');
interaction.reply({ embeds: [embed] });
},
};

View File

@ -1,28 +1,32 @@
const { Client, CommandInteraction, MessageEmbed } = require("discord.js");
const { MessageEmbed } = require('discord.js');
module.exports = {
name: "ping",
description: "returns ping of the Hullcss bot",
type: 'CHAT_INPUT',
/**
*
* @param {Client} client
* @param {CommandInteraction} interaction
* @param {String[]} args
*/
run: async (client, interaction, args) => {
let days = Math.floor(client.uptime / 86400000);
let hours = Math.floor(client.uptime / 3600000) % 24;
let minutes = Math.floor(client.uptime / 60000) % 60;
let seconds = Math.floor(client.uptime / 1000) % 60;
name: 'ping',
description: 'returns ping of the HullCSS bot',
type: 'CHAT_INPUT',
/**
*
* @param {Client} client
* @param {CommandInteraction} interaction
* @param {String[]} args
*/
run: async (client, interaction) => {
const days = Math.floor(client.uptime / 86400000);
const hours = Math.floor(client.uptime / 3600000) % 24;
const minutes = Math.floor(client.uptime / 60000) % 60;
const seconds = Math.floor(client.uptime / 1000) % 60;
const embed = new MessageEmbed()
.setColor('GREEN')
.setFooter({ text: `Called By: ${interaction.user.tag}`})
.setTimestamp()
.setTitle("Pong!")
.setDescription(`${client.ws.ping} ping to host`)
.addField('Uptime', ` ${days}days ${hours}hrs ${minutes}min ${seconds}sec`, true)
interaction.reply({ embeds: [embed]});
},
};
const embed = new MessageEmbed()
.setColor('GREEN')
.setFooter({ text: `Called By: ${interaction.user.tag}` })
.setTimestamp()
.setTitle('Pong!')
.setDescription(`${client.ws.ping} ping to host`)
.addField(
'Uptime',
` ${days}days ${hours}hrs ${minutes}min ${seconds}sec`,
true
);
interaction.reply({ embeds: [embed] });
},
};

View File

@ -1,22 +1,27 @@
const { Client, CommandInteraction, MessageEmbed } = require("discord.js");
const { MessageEmbed } = require('discord.js');
module.exports = {
name: "robsoc",
description: "returns robotics society discord link",
type: 'CHAT_INPUT',
/**
*
* @param {Client} client
* @param {CommandInteraction} interaction
* @param {String[]} args
*/
run: async (client, interaction, args) => {
const embed = new MessageEmbed()
.setTitle("Robotics Society")
.setColor('BLUE')
.setFooter({ text: `Called By: ${interaction.user.tag}`})
.setDescription('Robotics Society are a society where you can gain skills in building an actual robot, or get help with your assignments or exams, but they also run social nights where they go out to do stuff.')
.addField('You can join them from below!','https://discord.gg/cMP5CavnK4')
interaction.reply({ embeds: [embed]});
},
};
name: 'robsoc',
description: 'returns robotics society discord link',
type: 'CHAT_INPUT',
/**
*
* @param {Client} client
* @param {CommandInteraction} interaction
* @param {String[]} args
*/
run: async (client, interaction) => {
const embed = new MessageEmbed()
.setTitle('Robotics Society')
.setColor('BLUE')
.setFooter({ text: `Called By: ${interaction.user.tag}` })
.setDescription(
'Robotics Society are a society where you can gain skills in building an actual robot, or get help with your assignments or exams, but they also run social nights where they go out to do stuff.'
)
.addField(
'You can join them from below!',
'https://discord.gg/cMP5CavnK4'
);
interaction.reply({ embeds: [embed] });
},
};