mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
Merge branch 'master' of https://github.com/Skillz4Killz/Discordeno into next
This commit is contained in:
@@ -4,49 +4,21 @@
|
||||
|
||||
[](https://discord.gg/J4NqJ72)
|
||||

|
||||

|
||||
[](https://nest.land/package/Discordeno)
|
||||
|
||||
[WIP] 
|
||||
|
||||
## Why Discordeno?
|
||||
|
||||
### Beginner Developers
|
||||
|
||||
Don't worry a lot of developers start out coding their first projects as a Discord bot (I did 😉) and it is not so easy to do so. Discordeno is built considering all the issues wit pre-existing libraries, such as discord.js, and issues that I had when I first started out coding bots.
|
||||
Don't worry a lot of developers start out coding their first projects as a Discord bot (I did 😉) and it is not so easy to do so. Discordeno is built considering all the issues with pre-existing libraries and issues that I had when I first started out coding bots.
|
||||
If you are a beginner developer, you may check out these awesome official and unofficial boilerplates:
|
||||
|
||||
If you are a beginner developer, please use this official boilerplate: [GitHub](https://github.com/Skillz4Killz/Discordeno-bot-template) but there will be more listed on the website. It is a beautiful website indeed! Check it out!
|
||||
- Official Discordeno Boilerplate
|
||||
- [GitHub](https://github.com/Skillz4Killz/Discordeno-bot-template)
|
||||
- [Features](https://github.com/Skillz4Killz/Discordeno-bot-template#features)
|
||||
|
||||
**Modular commands, arguments, events, inhibitors, monitors, tasks.**
|
||||
|
||||
- Clean and powerful commands system
|
||||
- Powerful argument handling including validating, parsing and modifications.
|
||||
- Easily create custom arguments for your specific needs.
|
||||
- Command aliases.
|
||||
- Cooldowns and allowed uses before cooldown triggers.
|
||||
- Author and bot permission checks in server AND in channel!
|
||||
- Clean and powerful events system
|
||||
- Simple functions that are called when an event occurs.
|
||||
- Easily reloadable!
|
||||
- No possible memory leaks due to incorrect EventEmitter usage!
|
||||
- Useful events available to help debug!
|
||||
- Clean and powerful inhibitors system
|
||||
- Stops a command from running if a requirement fails.
|
||||
- Easily add custom inhibitors!
|
||||
- Clean and powerful monitors system.
|
||||
- Runs a function on every message sent. Useful for stuff like auto-moderation or tags.
|
||||
- Easily ignore bots, users, edits, dms.
|
||||
- Powerful permission checks.
|
||||
- Clean and powerful tasks system.
|
||||
- Runs a function at a certain interval. Useful for things like unmute and updating bot lists etc.
|
||||
- Can be used for cache sweeping to keep your cache optimized for exactly what you want.
|
||||
- Botlists code already made for most botlists. Just add your api tokens for each site and magic!
|
||||
- Clean and powerful languages system.
|
||||
- Built in multi-lingual support.
|
||||
- Uses i18next, one of the best localization tools available.
|
||||
- Supports nested folders to keep cleaner translation files
|
||||
|
||||
- **Hot Reloadable**: Easily update your code without having to restart the bot everytime.
|
||||
- **Step By Step Guide**: There is a step by step walkthrough to learn how to create Discord bots with Discordeno on our website!
|
||||
If you do not wish to use a boilerplate, you may continue reading.
|
||||
|
||||
### Advanced Developers
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
export { delay } from "https://deno.land/std@0.67.0/async/delay.ts";
|
||||
export { encode } from "https://deno.land/std@0.67.0/encoding/base64.ts";
|
||||
export {
|
||||
connectWebSocket,
|
||||
isWebSocketCloseEvent,
|
||||
@@ -7,9 +5,11 @@ export {
|
||||
isWebSocketPongEvent,
|
||||
} from "https://deno.land/std@0.67.0/ws/mod.ts";
|
||||
export type { WebSocket } from "https://deno.land/std@0.67.0/ws/mod.ts";
|
||||
export { delay } from "https://deno.land/std@0.75.0/async/delay.ts";
|
||||
export { encode } from "https://deno.land/std@0.75.0/encoding/base64.ts";
|
||||
export {
|
||||
assert,
|
||||
assertArrayIncludes,
|
||||
assertEquals,
|
||||
} from "https://deno.land/std@0.75.0/testing/asserts.ts";
|
||||
export { decompress_with as inflate } from "https://unpkg.com/@evan/wasm@0.0.11/target/zlib/deno.js";
|
||||
export { decompress_with as inflate } from "https://unpkg.com/@evan/wasm@0.0.12/target/zlib/deno.js";
|
||||
|
||||
@@ -113,7 +113,7 @@ Oh my god! You now have a bot with a bunch of features already! You don't believ
|
||||
3. Run the script below:
|
||||
|
||||
```shell
|
||||
deno run --allow-net --allow-read mod.ts
|
||||
deno run --allow-net --allow-read --no-check --config tsconfig.json mod.ts
|
||||
```
|
||||
|
||||
The first time you run it, you may see a lot of files being loaded. This is preparing all the magic behind the scene. Once it is ready, you will see something like this:
|
||||
|
||||
@@ -66,7 +66,7 @@ Let's add a custom description to our invite command.
|
||||
🎉 It's that simple. So let's restart the bot and see how it changed. Use **CTRL + C** to shut down the bot. Then run the command from earlier.
|
||||
|
||||
```shell
|
||||
deno run --allow-net --allow-read mod.ts
|
||||
deno run --allow-net --allow-read --no-check --config tsconfig.json mod.ts
|
||||
```
|
||||
|
||||
To access this easily, most likely all you need to do is press the **UP ARROW** key. Feel free to copy paste this if it doesn't work.
|
||||
|
||||
@@ -183,3 +183,17 @@ export function editMember(
|
||||
options,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Move a member from a voice channel to another.
|
||||
* @param guildID the id of the guild which the channel exists in
|
||||
* @param memberID the id of the member to move.
|
||||
* @param channelID id of channel to move user to (if they are connected to voice)
|
||||
*/
|
||||
export function moveMember(
|
||||
guildID: string,
|
||||
memberID: string,
|
||||
channelID: string,
|
||||
) {
|
||||
return editMember(guildID, memberID, { channel_id: channelID });
|
||||
}
|
||||
|
||||
+7
-7
@@ -2,7 +2,6 @@ import { assert, assertEquals, delay } from "../deps.ts";
|
||||
import {
|
||||
botID,
|
||||
cache,
|
||||
Channel,
|
||||
createClient,
|
||||
createGuildChannel,
|
||||
createGuildRole,
|
||||
@@ -144,8 +143,8 @@ Deno.test({
|
||||
Deno.test({
|
||||
name: "edit a channel in a guild",
|
||||
async fn() {
|
||||
const channel = await editChannel(data.channelID, {
|
||||
name: "edited channel",
|
||||
await editChannel(data.channelID, {
|
||||
name: "edited-channel",
|
||||
overwrites: [
|
||||
{
|
||||
id: data.roleID,
|
||||
@@ -154,11 +153,12 @@ Deno.test({
|
||||
deny: ["USE_EXTERNAL_EMOJIS"],
|
||||
},
|
||||
],
|
||||
}) as Channel;
|
||||
});
|
||||
// Wait 5 seconds for it to update
|
||||
await delay(5000);
|
||||
const editedChannel = await getChannel(data.channelID);
|
||||
|
||||
assert(channel);
|
||||
assertEquals(editedChannel.name, "edited channel");
|
||||
assertEquals(editedChannel.name, "edited-channel");
|
||||
},
|
||||
});
|
||||
|
||||
@@ -247,7 +247,7 @@ Deno.test({
|
||||
Deno.test({
|
||||
name: "exit the process forcefully after all the tests are done",
|
||||
async fn() {
|
||||
Deno.exit(1);
|
||||
Deno.exit();
|
||||
},
|
||||
...testOptions,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user