@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.
- package/dist/bot/BotMessage.d.ts +19 -1
- package/dist/bot/BotMessage.js +0 -1
- package/dist/manager/builder/SendableComponentBuilder.d.ts +3 -0
- package/dist/manager/builder/SendableComponentBuilder.js +1 -0
- package/dist/manager/direct/BasicUserManager.d.ts +28 -0
- package/dist/type/FolderName.d.ts +1 -5
- package/dist/type/FolderName.js +1 -0
- package/package.json +1 -1
package/dist/bot/BotMessage.d.ts
CHANGED
|
@@ -1,2 +1,20 @@
|
|
|
1
|
-
|
|
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
|
package/dist/bot/BotMessage.js
CHANGED
|
@@ -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 {
|
|
@@ -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
|
package/dist/type/FolderName.js
CHANGED