Skip to content
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
129 changes: 76 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,47 @@ OmegaBot uses discord.js v14 which includes:

```
.
├── .github
│ ├── ISSUE_TEMPLATE
│ │ ├── bug.yml
│ │ ├── config.yml
│ │ ├── documentation.yml
│ │ ├── enhancement_refactor.yml
│ │ ├── feature_request.yml
│ │ └── question_discussion.yml
│ ├── workflows
│ │ └── OmegaBot.yml
│ └── pull_request_template.md
├── .husky
│ ├── _
│ │ ├── .gitignore
│ │ ├── applypatch-msg
│ │ ├── commit-msg
│ │ ├── h
│ │ ├── husky.sh
│ │ ├── post-applypatch
│ │ ├── post-checkout
│ │ ├── post-commit
│ │ ├── post-merge
│ │ ├── post-rewrite
│ │ ├── pre-applypatch
│ │ ├── pre-auto-gc
│ │ ├── pre-commit
│ │ ├── pre-merge-commit
│ │ ├── pre-push
│ │ ├── pre-rebase
│ │ └── prepare-commit-msg
│ ├── pre-commit
│ └── pre-push
├── assets
│ ├── banner.png
│ └── omegabot.png
├── CHANGELOG.md
├── CONTRIBUTORS.md
├── data
│ ├── faqs.json
│ ├── fun-usage.json
│ ├── github-assignees.json
│ ├── guild-config.json
│ ├── last-seen.json
│ └── omegabot.db
├── docs
│ ├── commands.md
Expand All @@ -228,69 +263,44 @@ OmegaBot uses discord.js v14 which includes:
│ ├── setup-discord.md
│ ├── setup-env.md
│ └── transcripts.md
├── .env
├── .env.example
├── eslint.config.ts
├── .github
│ ├── ISSUE_TEMPLATE
│ │ ├── bug.yml
│ │ ├── config.yml
│ │ ├── documentation.yml
│ │ ├── enhancement_refactor.yml
│ │ ├── feature_request.yml
│ │ └── question_discussion.yml
│ ├── pull_request_template.md
│ └── workflows
│ └── OmegaBot.yml
├── .gitignore
├── .husky
│ ├── pre-commit
│ └── pre-push
├── LICENSE
├── package.json
├── package-lock.json
├── .prettierignore
├── .prettierrc.yml
├── README.md
├── scripts
│ └── precheck.sh
├── src
│ ├── bot.ts
│ ├── commands
│ │ ├── changelog
│ │ │ └── changelog.ts
│ │ ├── config
│ │ │ └── config.ts
│ │ ├── faq
│ │ │ ├── faq.ts
│ │ │ ── subcommands
│ │ │ ├── add.ts
│ │ │ ├── get.ts
│ │ │ ── list.ts
│ │ │ └── remove.ts
│ │ │ ├── subcommands
│ │ │ │ ├── add.ts
│ │ │ ├── get.ts
│ │ │ ├── list.ts
│ │ │ ── remove.ts
│ │ │ └── faq.ts
│ │ ├── fun
│ │ │ ├── fun.ts
│ │ │ ── subcommands
│ │ │ ├── coinflip.ts
│ │ │ ├── dice.ts
│ │ │ ├── joke
│ │ │ │ ├── add.ts
│ │ │ ── index.ts
│ │ │ │ ├── list.ts
│ │ │ │ ├── random.ts
│ │ │ ── remove.ts
│ │ │ ├── leaderboard.ts
│ │ │ ── poll.ts
│ │ │ └── weather.ts
│ │ │ ├── subcommands
│ │ │ │ ├── joke
│ │ │ ├── add.ts
│ │ │ ├── index.ts
│ │ │ ├── list.ts
│ │ │ │ ├── random.ts
│ │ │ ── remove.ts
│ │ │ │ ├── coinflip.ts
│ │ │ │ ├── dice.ts
│ │ │ │ ── leaderboard.ts
│ │ │ ├── poll.ts
│ │ │ ── weather.ts
│ │ │ └── fun.ts
│ │ ├── general
│ │ │ └── ping.ts
│ │ ├── github
│ │ │ ├── gh.ts
│ │ │ ├── pr.ts
│ │ │ └── status.ts
│ │ ├── help
│ │ │ ├── helpText.ts
│ │ │ └── help.ts
│ │ │ ├── help.ts
│ │ │ └── helpText.ts
│ │ ├── history
│ │ │ └── history.ts
│ │ ├── pagination
Expand All @@ -303,7 +313,6 @@ OmegaBot uses discord.js v14 which includes:
│ │ └── timezone.ts
│ ├── config
│ │ └── env.ts
│ ├── registerCommands.ts
│ ├── services
│ │ ├── cache
│ │ │ └── simpleCache.ts
Expand All @@ -322,11 +331,11 @@ OmegaBot uses discord.js v14 which includes:
│ │ │ ├── interactionHandler.ts
│ │ │ └── safeReply.ts
│ │ ├── faq
│ │ │ ├── _shared.ts
│ │ │ ├── faqService.ts
│ │ │ ├── permissions.ts
│ │ │ ├── services.test.ts
│ │ │ ├── services.ts
│ │ │ ├── _shared.ts
│ │ │ ├── store.test.ts
│ │ │ ├── store.test.ts.disabled
│ │ │ ├── store.ts
Expand All @@ -349,7 +358,6 @@ OmegaBot uses discord.js v14 which includes:
│ │ │ └── types.ts
│ │ ├── joke
│ │ │ └── jokeStore.ts
│ │ ├── permissions
│ │ ├── roles
│ │ │ └── autoRoleHandler.ts
│ │ ├── summary
Expand All @@ -370,8 +378,23 @@ OmegaBot uses discord.js v14 which includes:
│ │ └── welcome
│ │ ├── welcomeHandler.ts
│ │ └── welcomeMessage.ts
│ └── utils
│ └── logger.ts
│ ├── utils
│ │ ├── colors.ts
│ │ ├── interactions.ts
│ │ └── logger.ts
│ ├── bot.ts
│ └── registerCommands.ts
├── .env.example
├── .gitignore
├── .prettierignore
├── .prettierrc.yml
├── CHANGELOG.md
├── CONTRIBUTORS.md
├── eslint.config.ts
├── LICENSE
├── package-lock.json
├── package.json
├── README.md
├── tsconfig.json
└── vitest.config.ts

Expand Down
16 changes: 10 additions & 6 deletions src/commands/config/config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { MessageFlags } from "discord.js";
// src/commands/config/config.ts

import {
Expand Down Expand Up @@ -53,7 +54,7 @@ export async function execute(interaction: ChatInputCommandInteraction) {
if (!interaction.guildId) {
await interaction.reply({
content: "This command can only be used in a server (not in DMs).",
ephemeral: true,
flags: MessageFlags.Ephemeral,
});
return;
}
Expand All @@ -62,7 +63,10 @@ export async function execute(interaction: ChatInputCommandInteraction) {
const sub = interaction.options.getSubcommand();

if (group !== "welcome-channel") {
await interaction.reply({ content: "Unknown config group.", ephemeral: true });
await interaction.reply({
content: "Unknown config group.",
flags: MessageFlags.Ephemeral,
});
return;
}

Expand All @@ -73,7 +77,7 @@ export async function execute(interaction: ChatInputCommandInteraction) {
if (channel.type !== ChannelType.GuildText) {
await interaction.reply({
content: "Please choose a normal text channel (not a thread or DM).",
ephemeral: true,
flags: MessageFlags.Ephemeral,
});
return;
}
Expand All @@ -90,7 +94,7 @@ export async function execute(interaction: ChatInputCommandInteraction) {

await interaction.reply({
content: `✅ Welcome messages will be posted in <#${updated.welcomeChannelId}>.`,
ephemeral: true,
flags: MessageFlags.Ephemeral,
});
return;
}
Expand All @@ -103,7 +107,7 @@ export async function execute(interaction: ChatInputCommandInteraction) {
await interaction.reply({
content:
"Welcome channel is already not set. I will use the system channel or first text channel as a fallback.",
ephemeral: true,
flags: MessageFlags.Ephemeral,
});
return;
}
Expand All @@ -118,7 +122,7 @@ export async function execute(interaction: ChatInputCommandInteraction) {
await interaction.reply({
content:
"✅ Cleared the welcome channel. I will use the system channel or first text channel as a fallback.",
ephemeral: true,
flags: MessageFlags.Ephemeral,
});
}
}
2 changes: 1 addition & 1 deletion src/commands/fun/fun.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ export async function execute(interaction: ChatInputCommandInteraction): Promise
if (!interaction.replied && !interaction.deferred) {
await interaction.reply({
content: "Something went wrong. Try again in a bit.",
ephemeral: true,
flags: MessageFlags.Ephemeral,
});
} else {
await interaction.editReply("Something went wrong. Try again in a bit.");
Expand Down
5 changes: 3 additions & 2 deletions src/commands/fun/subcommands/joke/add.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { MessageFlags } from "discord.js";
// src/commands/fun/subcommands/joke/add.ts
import type { ChatInputCommandInteraction } from "discord.js";
import { addJoke, type JokeCategory } from "../../../../services/joke/jokeStore.js";
Expand All @@ -11,7 +12,7 @@ export async function handleJokeAdd(
if (jokeText.length > 1000) {
await interaction.reply({
content: "Joke is too long! Keep it under 1000 characters.",
ephemeral: true,
flags: MessageFlags.Ephemeral,
});
return;
}
Expand All @@ -27,6 +28,6 @@ export async function handleJokeAdd(
"",
joke.joke_text,
].join("\n"),
ephemeral: true,
flags: MessageFlags.Ephemeral,
});
}
3 changes: 2 additions & 1 deletion src/commands/fun/subcommands/joke/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { MessageFlags } from "discord.js";
// src/commands/fun/subcommands/joke/index.ts
import {
SlashCommandSubcommandBuilder,
Expand Down Expand Up @@ -87,7 +88,7 @@ export async function handleJoke(
default:
await interaction.reply({
content: "Unknown subcommand",
ephemeral: true,
flags: MessageFlags.Ephemeral,
});
}
}
6 changes: 3 additions & 3 deletions src/commands/fun/subcommands/joke/list.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// src/commands/fun/subcommands/joke/list.ts
import { EmbedBuilder, type ChatInputCommandInteraction } from "discord.js";
import { MessageFlags, EmbedBuilder, type ChatInputCommandInteraction } from "discord.js";
import {
listJokes,
getJokeStats,
Expand Down Expand Up @@ -35,7 +35,7 @@ export async function handleJokeList(
content: category
? `No jokes in the ${category} category yet.`
: "No jokes added yet. Be the first with `/fun joke add`!",
ephemeral: true,
flags: MessageFlags.Ephemeral,
});
return;
}
Expand Down Expand Up @@ -63,5 +63,5 @@ export async function handleJokeList(
})
.setColor(0xffd700); // Gold color for fun commands

await interaction.reply({ embeds: [embed], ephemeral: true });
await interaction.reply({ embeds: [embed], flags: MessageFlags.Ephemeral });
}
3 changes: 2 additions & 1 deletion src/commands/fun/subcommands/joke/random.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { MessageFlags } from "discord.js";
// src/commands/fun/subcommands/joke/random.ts
import type { ChatInputCommandInteraction } from "discord.js";
import { getRandomJoke, type JokeCategory } from "../../../../services/joke/jokeStore.js";
Expand Down Expand Up @@ -30,7 +31,7 @@ export async function handleJokeRandom(
content: category
? `No jokes found in the ${category} category. Add some with \`/fun joke add\`!`
: "No jokes available yet. Add some with `/fun joke add`!",
ephemeral: true,
flags: MessageFlags.Ephemeral,
});
return;
}
Expand Down
13 changes: 7 additions & 6 deletions src/commands/fun/subcommands/joke/remove.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { MessageFlags } from "discord.js";
// src/commands/fun/subcommands/joke/remove.ts
import type { ChatInputCommandInteraction } from "discord.js";
import { removeJoke, getJoke } from "../../../../services/joke/jokeStore.js";
Expand All @@ -11,7 +12,7 @@ export async function handleJokeRemove(
if (!interaction.inGuild() || !interaction.member) {
await interaction.reply({
content: "This command can only be used in a server.",
ephemeral: true,
flags: MessageFlags.Ephemeral,
});
return;
}
Expand All @@ -23,7 +24,7 @@ export async function handleJokeRemove(
if (typeof member === "string") {
await interaction.reply({
content: "Could not verify your permissions.",
ephemeral: true,
flags: MessageFlags.Ephemeral,
});
return;
}
Expand All @@ -38,7 +39,7 @@ export async function handleJokeRemove(
if (!hasModRole) {
await interaction.reply({
content: "❌ Only joke moderators can remove jokes.",
ephemeral: true,
flags: MessageFlags.Ephemeral,
});
return;
}
Expand All @@ -48,7 +49,7 @@ export async function handleJokeRemove(
if (!joke) {
await interaction.reply({
content: `Joke #${jokeId} not found.`,
ephemeral: true,
flags: MessageFlags.Ephemeral,
});
return;
}
Expand All @@ -63,12 +64,12 @@ export async function handleJokeRemove(
`Category: ${joke.category}`,
`Text: ${joke.joke_text.substring(0, 100)}${joke.joke_text.length > 100 ? "..." : ""}`,
].join("\n"),
ephemeral: true,
flags: MessageFlags.Ephemeral,
});
} else {
await interaction.reply({
content: `Failed to remove joke #${jokeId}.`,
ephemeral: true,
flags: MessageFlags.Ephemeral,
});
}
}
Loading