@spatulox/simplediscordbot 1.0.34 → 1.0.36
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/README.md +6 -1
- package/dist/index.d.mts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +173 -136
- package/dist/index.mjs +144 -105
- package/package.json +8 -2
- package/.npmignore_old +0 -23
package/README.md
CHANGED
|
@@ -13,9 +13,14 @@ npm i @spatulox/simplediscordbot
|
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
> **TypeScript Discord.js framework** - Simple, powerful, framework-ready. Built for developers who want clean bot architecture.
|
|
16
|
-
|
|
17
16
|
## Quick Start
|
|
18
17
|
|
|
18
|
+
Env Variables:
|
|
19
|
+
```bash
|
|
20
|
+
DISCORD_BOT_TOKEN="" // Your bot Token
|
|
21
|
+
DISCORD_BOT_CLIENTID="" // Yout bot client id
|
|
22
|
+
```
|
|
23
|
+
|
|
19
24
|
```typescript
|
|
20
25
|
import {Bot, BotConfig, EmbedColor, Time} from "@spatulox/simplediscordbot";
|
|
21
26
|
import {Client, Events, GatewayIntentBits} from "discord.js";
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { EmbedBuilder, Message, InteractionDeferReplyOptions, InteractionReplyOptions, InteractionEditReplyOptions, MessageCreateOptions,
|
|
1
|
+
import { EmbedBuilder, ActionRowBuilder, MessageActionRowComponentBuilder, Message, InteractionDeferReplyOptions, InteractionReplyOptions, InteractionEditReplyOptions, MessageCreateOptions, TextChannel, DMChannel, ThreadChannel, User, GuildMember, BaseInteraction, InteractionResponse, Client, ActivityType, WebhookMessageCreateOptions, EmojiResolvable, Guild, BanOptions, Snowflake, GuildBasedChannel, GuildChannelCreateOptions, ForumChannel, NewsChannel, StageChannel, StartThreadOptions, VoiceChannel, Invite, Channel, Collection, GuildBan, ModalBuilder, StringSelectMenuBuilder, UserSelectMenuBuilder, RoleSelectMenuBuilder, MentionableSelectMenuBuilder, ChannelType, ChannelSelectMenuBuilder, StringSelectMenuOptionBuilder } from 'discord.js';
|
|
2
|
+
|
|
3
|
+
type SendableComponent = EmbedBuilder | ActionRowBuilder<MessageActionRowComponentBuilder>;
|
|
2
4
|
|
|
3
5
|
type ConfigLog = {
|
|
4
6
|
logChannelId: string;
|
|
@@ -36,19 +38,19 @@ declare class BotLog {
|
|
|
36
38
|
/**
|
|
37
39
|
* Send INFO log - TEXT or EMBED ! Respecte config.log.info
|
|
38
40
|
*/
|
|
39
|
-
static info(content: string |
|
|
41
|
+
static info(content: string | SendableComponent): Promise<Message | void>;
|
|
40
42
|
/**
|
|
41
43
|
* Send ERROR log - TEXT or EMBED ! Respecte config.log.error
|
|
42
44
|
*/
|
|
43
|
-
static error(content: string |
|
|
45
|
+
static error(content: string | SendableComponent): Promise<Message | void>;
|
|
44
46
|
/**
|
|
45
47
|
* Send WARNING log - TEXT or EMBED ! Respecte config.log.warn
|
|
46
48
|
*/
|
|
47
|
-
static warn(content: string |
|
|
49
|
+
static warn(content: string | SendableComponent): Promise<Message | void>;
|
|
48
50
|
/**
|
|
49
51
|
* Send DEBUG log - TEXT or EMBED ! Respecte config.log.debug
|
|
50
52
|
*/
|
|
51
|
-
static debug(content: string |
|
|
53
|
+
static debug(content: string | SendableComponent): Promise<Message | void>;
|
|
52
54
|
}
|
|
53
55
|
|
|
54
56
|
declare enum EmbedColor {
|
|
@@ -147,8 +149,6 @@ declare class EmbedManager {
|
|
|
147
149
|
static toMessage(embed: EmbedBuilder): MessageCreateOptions;
|
|
148
150
|
}
|
|
149
151
|
|
|
150
|
-
type SendableComponent = EmbedBuilder | ActionRowBuilder<MessageActionRowComponentBuilder>;
|
|
151
|
-
|
|
152
152
|
declare class BotMessage {
|
|
153
153
|
/**
|
|
154
154
|
* Send message to any text-based channel
|
|
@@ -318,7 +318,7 @@ declare abstract class BasicUserManager {
|
|
|
318
318
|
/**
|
|
319
319
|
* Find member in specific guild
|
|
320
320
|
*/
|
|
321
|
-
static findInGuild(
|
|
321
|
+
static findInGuild(guild: string | Guild, memberId: string): Promise<GuildMember | null>;
|
|
322
322
|
/**
|
|
323
323
|
* Check if user is still in guild
|
|
324
324
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { EmbedBuilder, Message, InteractionDeferReplyOptions, InteractionReplyOptions, InteractionEditReplyOptions, MessageCreateOptions,
|
|
1
|
+
import { EmbedBuilder, ActionRowBuilder, MessageActionRowComponentBuilder, Message, InteractionDeferReplyOptions, InteractionReplyOptions, InteractionEditReplyOptions, MessageCreateOptions, TextChannel, DMChannel, ThreadChannel, User, GuildMember, BaseInteraction, InteractionResponse, Client, ActivityType, WebhookMessageCreateOptions, EmojiResolvable, Guild, BanOptions, Snowflake, GuildBasedChannel, GuildChannelCreateOptions, ForumChannel, NewsChannel, StageChannel, StartThreadOptions, VoiceChannel, Invite, Channel, Collection, GuildBan, ModalBuilder, StringSelectMenuBuilder, UserSelectMenuBuilder, RoleSelectMenuBuilder, MentionableSelectMenuBuilder, ChannelType, ChannelSelectMenuBuilder, StringSelectMenuOptionBuilder } from 'discord.js';
|
|
2
|
+
|
|
3
|
+
type SendableComponent = EmbedBuilder | ActionRowBuilder<MessageActionRowComponentBuilder>;
|
|
2
4
|
|
|
3
5
|
type ConfigLog = {
|
|
4
6
|
logChannelId: string;
|
|
@@ -36,19 +38,19 @@ declare class BotLog {
|
|
|
36
38
|
/**
|
|
37
39
|
* Send INFO log - TEXT or EMBED ! Respecte config.log.info
|
|
38
40
|
*/
|
|
39
|
-
static info(content: string |
|
|
41
|
+
static info(content: string | SendableComponent): Promise<Message | void>;
|
|
40
42
|
/**
|
|
41
43
|
* Send ERROR log - TEXT or EMBED ! Respecte config.log.error
|
|
42
44
|
*/
|
|
43
|
-
static error(content: string |
|
|
45
|
+
static error(content: string | SendableComponent): Promise<Message | void>;
|
|
44
46
|
/**
|
|
45
47
|
* Send WARNING log - TEXT or EMBED ! Respecte config.log.warn
|
|
46
48
|
*/
|
|
47
|
-
static warn(content: string |
|
|
49
|
+
static warn(content: string | SendableComponent): Promise<Message | void>;
|
|
48
50
|
/**
|
|
49
51
|
* Send DEBUG log - TEXT or EMBED ! Respecte config.log.debug
|
|
50
52
|
*/
|
|
51
|
-
static debug(content: string |
|
|
53
|
+
static debug(content: string | SendableComponent): Promise<Message | void>;
|
|
52
54
|
}
|
|
53
55
|
|
|
54
56
|
declare enum EmbedColor {
|
|
@@ -147,8 +149,6 @@ declare class EmbedManager {
|
|
|
147
149
|
static toMessage(embed: EmbedBuilder): MessageCreateOptions;
|
|
148
150
|
}
|
|
149
151
|
|
|
150
|
-
type SendableComponent = EmbedBuilder | ActionRowBuilder<MessageActionRowComponentBuilder>;
|
|
151
|
-
|
|
152
152
|
declare class BotMessage {
|
|
153
153
|
/**
|
|
154
154
|
* Send message to any text-based channel
|
|
@@ -318,7 +318,7 @@ declare abstract class BasicUserManager {
|
|
|
318
318
|
/**
|
|
319
319
|
* Find member in specific guild
|
|
320
320
|
*/
|
|
321
|
-
static findInGuild(
|
|
321
|
+
static findInGuild(guild: string | Guild, memberId: string): Promise<GuildMember | null>;
|
|
322
322
|
/**
|
|
323
323
|
* Check if user is still in guild
|
|
324
324
|
*/
|