Skip to content

Commit 730ad22

Browse files
committed
feat: Transition useful links to slash command
1 parent 4aa8490 commit 730ad22

File tree

2 files changed

+61
-53
lines changed

2 files changed

+61
-53
lines changed

src/commands/embeds/usefullinks.js

-53
This file was deleted.
+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
const {
2+
SlashCommandBuilder,
3+
PermissionFlagsBits,
4+
EmbedBuilder,
5+
ActionRowBuilder,
6+
ButtonBuilder,
7+
} = require('discord.js');
8+
9+
module.exports = {
10+
...new SlashCommandBuilder()
11+
.setName('usefullinks')
12+
.setDescription('Create the useful links embed')
13+
.setDefaultMemberPermissions(
14+
PermissionFlagsBits.KickMembers || PermissionFlagsBits.BanMembers
15+
),
16+
17+
/**
18+
*
19+
* @param {Client} client
20+
* @param {CommandInteraction} interaction
21+
* @param {String[]} args
22+
*/
23+
run: async (client, interaction) => {
24+
const embed = new EmbedBuilder()
25+
.setColor(0x3fb618)
26+
.setFooter({ text: `Called By: ${interaction.user.tag}` })
27+
.setTimestamp()
28+
.setTitle('Useful Links!')
29+
.setDescription(
30+
`Below are a some useful links to communities and resources.`
31+
)
32+
.setThumbnail('https://i.imgur.com/ww6wKwJ.png')
33+
.addFields(
34+
{
35+
name: 'Free Stuff',
36+
value: `- GitHub Student Developer Pack: https://education.github.com/pack\r\n
37+
- Microsoft Azure Dev Tools for Teaching: https://azure.microsoft.com/en-gb/free/students/\r\n
38+
- JetBrains IDE Package: https://www.jetbrains.com/community/education/#students\r\n`
39+
},
40+
{
41+
name: 'University of Hull Specifics',
42+
value: `- Freeside Student Resource List: https://github.com/FreesideHull/StudentResources\r\n
43+
- Hull University Buddy: https://chrome.google.com/webstore/detail/hull-university-buddy/jnppmhcoifoohipnnhdabhnolnilncbk\r\n`
44+
},
45+
{
46+
name: `Other Communities`,
47+
value: `- Freeside: https://freeside.co.uk/ \r\n
48+
- Unofficial University of Hull Discord Server: https://discord.gg/rm7r5wbYq2 \r\n
49+
- The Programmers Hangout: https://discord.gg/programming`
50+
},
51+
{
52+
name: 'Want to add a resource?',
53+
value: 'Message an <@&427866208726155274> with your suggestion for consideration!'
54+
}
55+
)
56+
57+
interaction.channel.send({ embeds: [embed] });
58+
interaction.reply({ content: 'Embed sent.', ephemeral: true });
59+
60+
},
61+
};

0 commit comments

Comments
 (0)