Skip to content

Commit

Permalink
feat: reword spoonfeed command to be nice (#3)
Browse files Browse the repository at this point in the history
Co-authored-by: David Malchin <[email protected]>
  • Loading branch information
Sharkiiie and D4isDAVID authored Dec 17, 2024
1 parent 84043c6 commit 4959210
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import {
ApplicationCommandOptionType,
ApplicationCommandType,
} from '@discordjs/core';
import { spoonfeedMessage } from './message.js';
import { learnMessage } from './message.js';
import { ChatInputCommand } from '/components/types.js';
import { mapChatInputOptionValues } from '/utils/interactions.js';

export const spoonfeedCommand = {
export const learnCommand = {
data: {
type: ApplicationCommandType.ChatInput,
name: 'spoonfeed',
name: 'learn',
description: 'Send information about how to learn',
options: [
{
Expand All @@ -25,7 +25,7 @@ export const spoonfeedCommand = {
};

await api.interactions.reply(interaction.id, interaction.token, {
content: spoonfeedMessage(mention),
content: learnMessage(mention),
});
},
} satisfies ChatInputCommand;
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { ApplicationCommandType, MessageFlags } from '@discordjs/core';
import { messageLink, subtext, userMention } from '@discordjs/formatters';
import { spoonfeedMessage } from './message.js';
import { learnMessage } from './message.js';
import { MessageCommand } from '/components/types.js';

export const spoonfeedMessageCommand = {
export const learnMessageCommand = {
data: {
type: ApplicationCommandType.Message,
name: 'How to Learn',
Expand All @@ -18,7 +18,7 @@ export const spoonfeedMessageCommand = {
interaction.channel.id,
{
content: [
spoonfeedMessage(),
learnMessage(),
subtext(`Sent by ${userMention(user.id)}`),
].join('\n'),
message_reference: { message_id: interaction.data.target_id },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@ import {
userMention,
} from '@discordjs/formatters';

export function spoonfeedMessage(userId?: Snowflake) {
export function learnMessage(userId?: Snowflake) {
const content = [
bold('Information will not be spoonfed to you.'),
'You are expected to be able to learn and understand programming concepts.',
'Understand that even if you are "new to this dev stuff", we all started off with no knowledge in the space.',
'Just as we take our time and learn, you are advised to do the same. Here are a few links to help you start:',
"Learning programming can be both exciting and challenging, especially when you're starting out.",
'Diving into code, exploring resources, and experimenting are essential parts of the journey.',
'While it takes time and effort to develop your skills, we encourage curiosity and a growth mindset.',
"Whether you're an experienced programmer or new to FiveM development and Lua, we're here to support your learning.",
bold(
'Below are some excellent resources curated by the Qbox team to help you get started:',
),
unorderedList([
hyperlink('Lua Docs', hideLinkEmbed('https://lua.org/docs.html')),
hyperlink(
Expand Down
8 changes: 4 additions & 4 deletions src/components/utility/index.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { Component } from '../types.js';
import { guildCommand } from './commands/guild.js';
import { learnCommand } from './commands/learn/chat-input-command.js';
import { learnMessageCommand } from './commands/learn/message-command.js';
import { letmegooglethatCommand } from './commands/letmegooglethat.js';
import { plshelpCommand } from './commands/plshelp/chat-input-command.js';
import { plshelpMessageCommand } from './commands/plshelp/message-command.js';
import { spoonfeedCommand } from './commands/spoonfeed/chat-input-command.js';
import { spoonfeedMessageCommand } from './commands/spoonfeed/message-command.js';

export default {
commands: [
guildCommand,
learnCommand,
learnMessageCommand,
letmegooglethatCommand,
plshelpCommand,
plshelpMessageCommand,
spoonfeedCommand,
spoonfeedMessageCommand,
],
} satisfies Component;

0 comments on commit 4959210

Please sign in to comment.