
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
fishy-bot-framework
Advanced tools
A framework for creating complex discord bots easily.
npm install fishy-bot-framework -simport * as FBF from "fishy-bot-framework"
or const FBF = require("fishy-bot-framework")import * as FBF from "fishy-bot-framework"
const client = new FBF.FishyClient({
token:"discord bot token",
author:"Your name",
db_uri: "mongodb://myDBReader:D1fficultP%40ssw0rd@mongos0.example.com:27017",
guild_model: GuildModel,
cmd_dir: "dist/commands",
})
client.login()
A basic command should look something like this
// The code that gets run when the command gets called;
// It takes the arguments `FishyClient` and `Interaction`
export const run: FishyCommandCode = async (client, interaction) => {
interaction.send(`Current websocket ping: \`${client.ws.ping}ms\``);
};
// The configuration of the commands, it needs this to run
export const config: FishyCommandConfig = {
name: "ping", // Name of the command
bot_needed: false, // If the bot user is required to be in the guild
// Needed for `Interaction.channel.send()` for example
user_perms: [], // An array of permissions the user needs to run the command
interaction_options: { // Discord interaction options
// https://discord.com/developers/docs/interactions/slash-commands#create-global-application-command-json-params
name: "ping",
description: "Ping the bot"
},
};
Use these steps to create a new category
create - /commands/"category"/
create - /commands/"category"/index.ts
export - "name" & "description" from /commands/"category"/index.ts
create - /commands/"category"/command.ts
Example:

To create a button you can run:
interaction.send("Message", {
components: [
{
type: ComponentType.ActionRow,
components: [
{
type: ComponentType.Button,
style: ComponentStyle.Success,
label: "HEY",
custom_id: "send_ping",
},
],
},
],
});
To run code when this button is pressed, you can create a new file just like a normal command. You can put this file anywhere you can place a normal command.
Put this code in the new file:
export const run: FishyComponentCommandCode = async (client, interaction) => {
if (interaction instanceof ButtonInteraction) {
const memberID = interaction.data.custom_id.slice(config.custom_id.length);
const member = await interaction.guild?.members.fetch(memberID);
await member?.kick();
interaction.send("Kicked the member!");
}
};
export const config: FishyComponentCommandConfig = {
custom_id: "kick_",
atStart: true,
bot_needed: true,
user_perms: ["KICK_MEMBERS"],
};
To send a select menu, just like a button, you need to send message components
interaction.send("oi", {
components: [
{
type: ComponentType.ActionRow,
components: [
{
type: ComponentType.Select,
custom_id: "selectOption",
options: [
{
label:"Option 1", value:"1",
label:"Option 2", value:"2",
label:"Option 3", value:"3",
label:"Option 4", value:"4",
label:"Option 5", value:"5",
}
],
max_values: 3,
min_values: 1,
},
],
},
],
})
Then to do something with them
export const run: FishyComponentCommandCode = async (client, interaction) => {
if (interaction instanceof SelectInteraction) {
interaction.sendSilent(`You have selected: \`${interaction.data.values.join(", ")}\``);
}
};
export const config: FishyComponentCommandConfig = {
custom_id: "selectOption",
};
A basic event file should look something like this:
export const trigger: WSEventType | string = "INTERACTION_CREATE";
export async function run(client, data){
};
Required Mongoose data fields:
{
id: String, // The guild's id for fetching, index this
settings: Object // Used for disabeling commands
}
FAQs
A basic framework for making interaction based discord bot
We found that fishy-bot-framework demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.