@spatulox/simplediscordbot 1.0.7 → 1.0.8
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/test/client.js +15 -0
- package/dist/test/index.js +26 -0
- package/dist/test/randomActivityList.js +9 -0
- package/package.json +6 -2
- package/.env.example +0 -2
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.client = void 0;
|
|
4
|
+
const discord_js_1 = require("discord.js");
|
|
5
|
+
exports.client = new discord_js_1.Client({ intents: [
|
|
6
|
+
discord_js_1.GatewayIntentBits.Guilds,
|
|
7
|
+
discord_js_1.GatewayIntentBits.GuildMembers,
|
|
8
|
+
discord_js_1.GatewayIntentBits.GuildMessages,
|
|
9
|
+
discord_js_1.GatewayIntentBits.MessageContent,
|
|
10
|
+
discord_js_1.GatewayIntentBits.GuildMessageReactions,
|
|
11
|
+
discord_js_1.GatewayIntentBits.DirectMessageReactions,
|
|
12
|
+
discord_js_1.GatewayIntentBits.DirectMessages
|
|
13
|
+
],
|
|
14
|
+
partials: [discord_js_1.Partials.Channel]
|
|
15
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const index_1 = require("../index");
|
|
4
|
+
const client_1 = require("./client");
|
|
5
|
+
const discord_js_1 = require("discord.js");
|
|
6
|
+
const randomActivityList_1 = require("./randomActivityList");
|
|
7
|
+
async function main() {
|
|
8
|
+
const config = {
|
|
9
|
+
defaultEmbedColor: index_1.EmbedColor.blue, // (When embed are created with EmbedManager)
|
|
10
|
+
botName: "Simple Discord Bot", // The name of the bot
|
|
11
|
+
log: {
|
|
12
|
+
logChannelId: "1162047096220827831",
|
|
13
|
+
errorChannelId: "1162047096220827831",
|
|
14
|
+
info: { console: true, discord: true },
|
|
15
|
+
error: { console: true, discord: true },
|
|
16
|
+
warn: { console: true, discord: true },
|
|
17
|
+
debug: { console: true, discord: true },
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
const bot = new index_1.Bot(client_1.client, config);
|
|
21
|
+
bot.client.on(discord_js_1.Events.ClientReady, async () => {
|
|
22
|
+
index_1.Bot.setRandomActivity(randomActivityList_1.randomActivityList, index_1.Time.minute.MIN_10.toMilliseconds());
|
|
23
|
+
});
|
|
24
|
+
// After that, you can implement what you want
|
|
25
|
+
}
|
|
26
|
+
main();
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.randomActivityList = void 0;
|
|
4
|
+
const discord_js_1 = require("discord.js");
|
|
5
|
+
exports.randomActivityList = [
|
|
6
|
+
{ type: discord_js_1.ActivityType.Playing, message: "a normal game" },
|
|
7
|
+
{ type: discord_js_1.ActivityType.Playing, message: "a hard game" },
|
|
8
|
+
{ type: discord_js_1.ActivityType.Playing, message: "a weird game" }
|
|
9
|
+
];
|
package/package.json
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spatulox/simplediscordbot",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"author": "Spatulox",
|
|
5
5
|
"description": "Simple discord bot framework to set up a bot under 30 secondes",
|
|
6
|
-
"
|
|
6
|
+
"exports": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
7
11
|
"scripts": {
|
|
8
12
|
"build": "tsc",
|
|
9
13
|
"dev": "nodemon --exec tsx src/test/index.ts"
|
package/.env.example
DELETED