mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-04 01:40:08 +00:00
Fixes #97 Update docs and readme to use v8.4.1
This commit is contained in:
@@ -54,9 +54,9 @@ The instructions below are meant for advanced developers!
|
||||
Starting with Discordeno is very simple, you can start from scratch without any boilerplates/frameworks: Add this snippet of code into a new TypeScript file:
|
||||
|
||||
```typescript
|
||||
import Client from "https://x.nest.land/Discordeno@7.3.0/src/module/client.ts";
|
||||
import { sendMessage } from "https://x.nest.land/Discordeno@7.3.0/src/handlers/channel.ts";
|
||||
import { Intents } from "https://x.nest.land/Discordeno@7.3.0/src/types/options.ts";
|
||||
import Client from "https://x.nest.land/Discordeno@8.4.1/src/module/client.ts";
|
||||
import { sendMessage } from "https://x.nest.land/Discordeno@8.4.1/src/handlers/channel.ts";
|
||||
import { Intents } from "https://x.nest.land/Discordeno@8.4.1/src/types/options.ts";
|
||||
import config from "./config.ts";
|
||||
|
||||
Client({
|
||||
|
||||
@@ -106,13 +106,13 @@ Discordeno Version:
|
||||
```ts
|
||||
import Client, {
|
||||
updateEventHandlers,
|
||||
} from "https://x.nest.land/Discordeno@7.3.0/src/module/client.ts";
|
||||
} from "https://x.nest.land/Discordeno@8.4.1/src/module/client.ts";
|
||||
import { configs } from "./configs.ts";
|
||||
import { Intents } from "https://x.nest.land/Discordeno@7.3.0/src/types/options.ts";
|
||||
import { Intents } from "https://x.nest.land/Discordeno@8.4.1/src/types/options.ts";
|
||||
import { eventHandlers } from "./src/events/eventHandlers.ts";
|
||||
import { Message } from "https://x.nest.land/Discordeno@7.3.0/src/structures/message.ts";
|
||||
import { Message } from "https://x.nest.land/Discordeno@8.4.1/src/structures/message.ts";
|
||||
import { Command } from "./src/types/commands.ts";
|
||||
import { Guild } from "https://x.nest.land/Discordeno@7.3.0/src/structures/guild.ts";
|
||||
import { Guild } from "https://x.nest.land/Discordeno@8.4.1/src/structures/guild.ts";
|
||||
|
||||
export const botCache = {
|
||||
commands: new Map<string, Command>(),
|
||||
@@ -162,10 +162,10 @@ In our `ready.ts` file we can add the `ready` event listener.
|
||||
```ts
|
||||
import { botCache } from "../../mod.ts";
|
||||
import { configs } from "../../configs.ts";
|
||||
import { cache } from "https://x.nest.land/Discordeno@7.3.0/src/utils/cache.ts";
|
||||
import { editBotsStatus, chooseRandom } from "https://x.nest.land/Discordeno@7.3.0/src/utils/utils.ts";
|
||||
import { StatusType } from "https://x.nest.land/Discordeno@7.3.0/src/types/discord.ts";
|
||||
import { ActivityType } from "https://x.nest.land/Discordeno@7.3.0/src/types/activity.ts";
|
||||
import { cache } from "https://x.nest.land/Discordeno@8.4.1/src/utils/cache.ts";
|
||||
import { editBotsStatus, chooseRandom } from "https://x.nest.land/Discordeno@8.4.1/src/utils/utils.ts";
|
||||
import { StatusType } from "https://x.nest.land/Discordeno@8.4.1/src/types/discord.ts";
|
||||
import { ActivityType } from "https://x.nest.land/Discordeno@8.4.1/src/types/activity.ts";
|
||||
|
||||
botCache.eventHandlers.ready = function () {
|
||||
console.log(`[READY] Bot is online and ready in ${cache.guilds.size} guild(s)!`);
|
||||
@@ -241,7 +241,7 @@ module.exports = class addRoleCommand extends Command {
|
||||
This is how to do it with Discordeno:
|
||||
```ts
|
||||
import { botCache } from "../../mod.ts";
|
||||
import { addRole } from "https://x.nest.land/Discordeno@7.3.0/src/handlers/member.ts";
|
||||
import { addRole } from "https://x.nest.land/Discordeno@8.4.1/src/handlers/member.ts";
|
||||
import { sendAlertResponse, sendResponse } from "../utils/helpers.ts";
|
||||
|
||||
botCache.commands.set(`addrole`, {
|
||||
@@ -345,10 +345,10 @@ module.exports = class kickCommand extends Command {
|
||||
|
||||
Discordeno Version
|
||||
```ts
|
||||
import { sendMessage } from "https://x.nest.land/Discordeno@7.3.0/src/handlers/channel.ts";
|
||||
import { Member } from "https://x.nest.land/Discordeno@7.3.0/src/structures/member.ts";
|
||||
import { kick } from "https://x.nest.land/Discordeno@7.3.0/src/handlers/member.ts";
|
||||
import { deleteMessage } from "https://x.nest.land/Discordeno@7.3.0/src/handlers/message.ts";
|
||||
import { sendMessage } from "https://x.nest.land/Discordeno@8.4.1/src/handlers/channel.ts";
|
||||
import { Member } from "https://x.nest.land/Discordeno@8.4.1/src/structures/member.ts";
|
||||
import { kick } from "https://x.nest.land/Discordeno@8.4.1/src/handlers/member.ts";
|
||||
import { deleteMessage } from "https://x.nest.land/Discordeno@8.4.1/src/handlers/message.ts";
|
||||
import { botCache } from "../../mod.ts";
|
||||
import { createCommandAliases, sendResponse } from "../utils/helpers.ts";
|
||||
import { Embed } from "../utils/Embed.ts";
|
||||
|
||||
@@ -38,7 +38,7 @@ Now you've created an Application but it will need some code in order for it to
|
||||
|
||||
You can install Discordeno by importing:
|
||||
```ts
|
||||
import Client from "https://x.nest.land/Discordeno@7.3.0/src/module/client.ts";
|
||||
import Client from "https://x.nest.land/Discordeno@8.4.1/src/module/client.ts";
|
||||
```
|
||||
|
||||
## Example Usage
|
||||
@@ -46,9 +46,9 @@ import Client from "https://x.nest.land/Discordeno@7.3.0/src/module/client.ts";
|
||||
Starting with Discordeno is very simple, you can start from scratch without any boilerplates/frameworks: Add this snippet of code into a new TypeScript file:
|
||||
|
||||
```ts
|
||||
import Client from "https://x.nest.land/Discordeno@7.3.0/src/module/client.ts";
|
||||
import { sendMessage } from "https://x.nest.land/Discordeno@7.3.0/src/handlers/channel.ts";
|
||||
import { Intents } from "https://x.nest.land/Discordeno@7.3.0/src/types/options.ts";
|
||||
import Client from "https://x.nest.land/Discordeno@8.4.1/src/module/client.ts";
|
||||
import { sendMessage } from "https://x.nest.land/Discordeno@8.4.1/src/handlers/channel.ts";
|
||||
import { Intents } from "https://x.nest.land/Discordeno@8.4.1/src/types/options.ts";
|
||||
import config from "./config.ts";
|
||||
|
||||
Client({
|
||||
|
||||
@@ -12,8 +12,8 @@ Let's first start by taking an existing command and slightly modifying it to you
|
||||
|
||||
```ts
|
||||
import { botCache } from "../../mod.ts";
|
||||
import { sendMessage } from "https://x.nest.land/Discordeno@7.3.0/src/handlers/channel.ts";
|
||||
import { botID } from "https://x.nest.land/Discordeno@7.3.0/src/module/client.ts";
|
||||
import { sendMessage } from "https://x.nest.land/Discordeno@8.4.1/src/handlers/channel.ts";
|
||||
import { botID } from "https://x.nest.land/Discordeno@8.4.1/src/module/client.ts";
|
||||
|
||||
botCache.commands.set("invite", {
|
||||
name: "invite",
|
||||
@@ -122,7 +122,7 @@ Let's make a command that will allow guild admins to give or take roles from a m
|
||||
|
||||
```ts
|
||||
import { botCache } from "../../mod.ts";
|
||||
import { sendMessage } from "https://x.nest.land/Discordeno@7.3.0/src/handlers/channel.ts";
|
||||
import { sendMessage } from "https://x.nest.land/Discordeno@8.4.1/src/handlers/channel.ts";
|
||||
import { PermissionLevels } from "../types/commands.ts";
|
||||
import { createCommandAliases } from "../utils/helpers";
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@ Go ahead and open up the `src/events/ready.ts` file. When you open this file, yo
|
||||
|
||||
```ts
|
||||
import { botCache } from "../../mod.ts";
|
||||
import { cache } from "https://x.nest.land/Discordeno@7.3.0/src/utils/cache.ts";
|
||||
import logger from "https://x.nest.land/Discordeno@7.3.0/src/utils/logger.ts";
|
||||
import { cache } from "https://x.nest.land/Discordeno@8.4.1/src/utils/cache.ts";
|
||||
import logger from "https://x.nest.land/Discordeno@8.4.1/src/utils/logger.ts";
|
||||
|
||||
botCache.eventHandlers.ready = function () {
|
||||
logger.info(`Loaded ${botCache.arguments.size} Argument(s)`);
|
||||
@@ -64,7 +64,7 @@ import { botCache } from "../../mod.ts";
|
||||
import { Embed } from "../utils/Embed.ts";
|
||||
import { cache } from "../../deps.ts";
|
||||
import { configs } from "../../configs.ts";
|
||||
import { sendMessage } from "https://x.nest.land/Discordeno@7.3.0/src/handlers/channel.ts";
|
||||
import { sendMessage } from "https://x.nest.land/Discordeno@8.4.1/src/handlers/channel.ts";
|
||||
import { sendEmbed } from "../utils/helpers.ts";
|
||||
|
||||
botCache.eventHandlers.discordLog = function (error) {
|
||||
|
||||
@@ -75,7 +75,7 @@ The permission options are the exact same from the commands guide. These options
|
||||
|
||||
```ts
|
||||
import { botCache } from "../../mod.ts";
|
||||
import { deleteMessage } from "https://x.nest.land/Discordeno@7.3.0/src/handlers/message.ts";
|
||||
import { deleteMessage } from "https://x.nest.land/Discordeno@8.4.1/src/handlers/message.ts";
|
||||
import { translate } from "../utils/i18next.ts";
|
||||
import { sendAlertResponse } from "../utils/helpers.ts";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user