Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feet: Reword spoonfeed command to be nice #3

Merged
merged 5 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
Loading