Skip to content

Commit 880cb9b

Browse files
committed
Added Guild Slowchat Function
1 parent 255ec7c commit 880cb9b

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
sendPrivateMessage,
1111
sendSkyblockCoopMessage,
1212
sendGuildOfficerMessage,
13+
toggleGuildSlowChat,
1314
} from "./modules/index.js";
1415

1516
import type { Bot } from "../types/index.d.ts";
@@ -30,6 +31,7 @@ export const HyFlayer = (bot: Bot): void => {
3031
/* Functions */
3132
bot.sendGuildMessage = (msg: string) => sendGuildMessage(bot, msg);
3233
bot.sendGuildOfficerMessage = (msg: string) => sendGuildOfficerMessage(bot, msg);
34+
bot.toggleGuildSlowChat = () => toggleGuildSlowChat(bot);
3335
bot.sendPrivateMessage = (player: string, msg: string) => sendPrivateMessage(bot, player, msg);
3436
bot.sendSkyblockCoopMessage = (msg: string) => sendSkyblockCoopMessage(bot, msg);
3537

src/modules/guild.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,7 @@ export const sendGuildMessage = (bot: Bot, msg: string) => {
7979
export const sendGuildOfficerMessage = (bot: Bot, msg: string) => {
8080
bot.chat(`/oc ${msg}`);
8181
};
82+
83+
export const toggleGuildSlowChat = (bot: Bot) => {
84+
bot.chat(`/g slow`);
85+
};

types/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ export interface Bot extends MineflayerBot {
6464
};
6565
sendGuildMessage: (msg: string) => void;
6666
sendGuildOfficerMessage: (msg: string) => void;
67+
toggleGuildSlowChat: () => void;
6768
sendPrivateMessage: (player: string, msg: string) => void;
6869
sendSkyblockCoopMessage: (msg: string) => void;
6970
on<U extends keyof BotEvents>(event: U, listener: BotEvents[U]): this;

0 commit comments

Comments
 (0)