@spatulox/simplediscordbot 1.0.29 → 1.0.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,20 @@
1
- export {};
1
+ import { TextChannel, DMChannel, ThreadChannel, Message, User, GuildMember, MessageCreateOptions } from 'discord.js';
2
+ import { SendableComponent } from "../manager/builder/SendableComponentBuilder";
3
+ export declare class BotMessage {
4
+ /**
5
+ * Send message to any text-based channel
6
+ */
7
+ static send(channel: TextChannel | DMChannel | ThreadChannel | string, content?: string | null, component?: SendableComponent): Promise<Message | null>;
8
+ static send(channel: TextChannel | DMChannel | ThreadChannel | string, content: SendableComponent): Promise<Message | null>;
9
+ static send(channel: TextChannel | DMChannel | ThreadChannel | string, content: MessageCreateOptions): Promise<Message | null>;
10
+ static sendDM(user: User | GuildMember | string, content?: string, component?: SendableComponent): Promise<Message | null>;
11
+ /**
12
+ * Quick success message
13
+ */
14
+ static success(channel: TextChannel | DMChannel | ThreadChannel | User | GuildMember, message: string): Promise<Message | null>;
15
+ /**
16
+ * Quick error message
17
+ */
18
+ static error(channel: TextChannel | DMChannel | ThreadChannel | User | GuildMember, message: string): Promise<Message | null>;
19
+ }
2
20
  //# sourceMappingURL=BotMessage.d.ts.map
@@ -6,7 +6,6 @@ const Log_1 = require("../utils/Log");
6
6
  const Bot_1 = require("./Bot");
7
7
  const EmbedManager_1 = require("../manager/messages/EmbedManager");
8
8
  const SendableComponentBuilder_1 = require("../manager/builder/SendableComponentBuilder");
9
- /** @internal */
10
9
  class BotMessage {
11
10
  static async send(channel, content, component) {
12
11
  try {
@@ -0,0 +1,3 @@
1
+ import { ActionRowBuilder, EmbedBuilder, MessageActionRowComponentBuilder } from "discord.js";
2
+ export type SendableComponent = EmbedBuilder | ActionRowBuilder<MessageActionRowComponentBuilder>;
3
+ //# sourceMappingURL=SendableComponentBuilder.d.ts.map
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SendableComponentBuilder = void 0;
4
4
  const discord_js_1 = require("discord.js");
5
+ /** @internal */
5
6
  class SendableComponentBuilder {
6
7
  static isSendableComponent(thing) {
7
8
  return thing instanceof discord_js_1.EmbedBuilder || thing instanceof discord_js_1.ActionRowBuilder;
@@ -0,0 +1,28 @@
1
+ import { GuildMember, Message, MessageCreateOptions, User } from "discord.js";
2
+ import { SendableComponent } from "../builder/SendableComponentBuilder";
3
+ export declare abstract class BasicUserManager {
4
+ /**
5
+ * Find member in specific guild
6
+ */
7
+ static findInGuild(guildId: string, memberId: string): Promise<GuildMember | null>;
8
+ /**
9
+ * Check if user is still in guild
10
+ */
11
+ static isInGuild(guildId: string, userId: string): Promise<boolean>;
12
+ /**
13
+ * Overload for send
14
+ */
15
+ static send(user_id: string, content: string): Promise<Message>;
16
+ static send(user: User, content: string): Promise<Message>;
17
+ static send(user: GuildMember, content: string): Promise<Message>;
18
+ static send(user_id: string, component: SendableComponent | SendableComponent[]): Promise<Message>;
19
+ static send(user: User, component: SendableComponent | SendableComponent[]): Promise<Message>;
20
+ static send(user: GuildMember, component: SendableComponent | SendableComponent[]): Promise<Message>;
21
+ static send(user_id: string, content: string, component: SendableComponent | SendableComponent[]): Promise<Message>;
22
+ static send(user: User, content: string, component: SendableComponent | SendableComponent[]): Promise<Message>;
23
+ static send(user: GuildMember, content: string, component: SendableComponent | SendableComponent[]): Promise<Message>;
24
+ static send(user_id_or_user: string, options: MessageCreateOptions): Promise<Message>;
25
+ static send(user_id_or_user: User, options: MessageCreateOptions): Promise<Message>;
26
+ static send(user_id_or_user: GuildMember, options: MessageCreateOptions): Promise<Message>;
27
+ }
28
+ //# sourceMappingURL=BasicUserManager.d.ts.map
@@ -1,6 +1,2 @@
1
- export declare enum FolderName {
2
- SLASH_COMMANDS = "commands",
3
- CONTEXT_MENU = "context_menu",
4
- MODAL = "modals"
5
- }
1
+ export {};
6
2
  //# sourceMappingURL=FolderName.d.ts.map
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FolderName = void 0;
4
+ /** @internal */
4
5
  var FolderName;
5
6
  (function (FolderName) {
6
7
  FolderName["SLASH_COMMANDS"] = "commands";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spatulox/simplediscordbot",
3
- "version": "1.0.29",
3
+ "version": "1.0.30",
4
4
  "author": "Spatulox",
5
5
  "description": "Simple discord bot framework to set up a bot under 30 secondes",
6
6
  "exports": {