mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 19:28:17 +00:00
Switch to deno.land/x from x.nest.land (#227)
* Change import Links * Update import Links * Update createcommand.md * Update createevent.md
This commit is contained in:
+13
-13
@@ -102,13 +102,13 @@ Discordeno Version:
|
|||||||
```ts
|
```ts
|
||||||
import Client, {
|
import Client, {
|
||||||
updateEventHandlers,
|
updateEventHandlers,
|
||||||
} from "https://x.nest.land/Discordeno@9.0.1/src/module/client.ts";
|
} from "https://deno.land/x/discordeno@9.4.0/src/module/client.ts";
|
||||||
import { configs } from "./configs.ts";
|
import { configs } from "./configs.ts";
|
||||||
import { Intents } from "https://x.nest.land/Discordeno@9.0.1/src/types/options.ts";
|
import { Intents } from "https://deno.land/x/discordeno@9.4.0/src/types/options.ts";
|
||||||
import { eventHandlers } from "./src/events/eventHandlers.ts";
|
import { eventHandlers } from "./src/events/eventHandlers.ts";
|
||||||
import { Message } from "https://x.nest.land/Discordeno@9.0.1/src/structures/message.ts";
|
import { Message } from "https://deno.land/x/discordeno@9.4.0/src/structures/message.ts";
|
||||||
import { Command } from "./src/types/commands.ts";
|
import { Command } from "./src/types/commands.ts";
|
||||||
import { Guild } from "https://x.nest.land/Discordeno@9.0.1/src/structures/guild.ts";
|
import { Guild } from "https://deno.land/x/discordeno@9.4.0/src/structures/guild.ts";
|
||||||
|
|
||||||
export const botCache = {
|
export const botCache = {
|
||||||
commands: new Map<string, Command>(),
|
commands: new Map<string, Command>(),
|
||||||
@@ -158,10 +158,10 @@ In our `ready.ts` file we can add the `ready` event listener.
|
|||||||
```ts
|
```ts
|
||||||
import { botCache } from "../../mod.ts";
|
import { botCache } from "../../mod.ts";
|
||||||
import { configs } from "../../configs.ts";
|
import { configs } from "../../configs.ts";
|
||||||
import { cache } from "https://x.nest.land/Discordeno@9.0.1/src/utils/cache.ts";
|
import { cache } from "https://deno.land/x/discordeno@9.4.0/src/utils/cache.ts";
|
||||||
import { editBotsStatus, chooseRandom } from "https://x.nest.land/Discordeno@9.0.1/src/utils/utils.ts";
|
import { editBotsStatus, chooseRandom } from "https://deno.land/x/discordeno@9.4.0/src/utils/utils.ts";
|
||||||
import { StatusType } from "https://x.nest.land/Discordeno@9.0.1/src/types/discord.ts";
|
import { StatusType } from "https://deno.land/x/discordeno@9.4.0/src/types/discord.ts";
|
||||||
import { ActivityType } from "https://x.nest.land/Discordeno@9.0.1/src/types/activity.ts";
|
import { ActivityType } from "https://deno.land/x/discordeno@9.4.0/src/types/activity.ts";
|
||||||
|
|
||||||
botCache.eventHandlers.ready = function () {
|
botCache.eventHandlers.ready = function () {
|
||||||
console.log(`[READY] Bot is online and ready in ${cache.guilds.size} guild(s)!`);
|
console.log(`[READY] Bot is online and ready in ${cache.guilds.size} guild(s)!`);
|
||||||
@@ -237,7 +237,7 @@ module.exports = class addRoleCommand extends Command {
|
|||||||
This is how to do it with Discordeno:
|
This is how to do it with Discordeno:
|
||||||
```ts
|
```ts
|
||||||
import { botCache } from "../../mod.ts";
|
import { botCache } from "../../mod.ts";
|
||||||
import { addRole } from "https://x.nest.land/Discordeno@9.0.1/src/handlers/member.ts";
|
import { addRole } from "https://deno.land/x/discordeno@9.4.0/src/handlers/member.ts";
|
||||||
import { sendAlertResponse, sendResponse } from "../utils/helpers.ts";
|
import { sendAlertResponse, sendResponse } from "../utils/helpers.ts";
|
||||||
|
|
||||||
botCache.commands.set(`addrole`, {
|
botCache.commands.set(`addrole`, {
|
||||||
@@ -341,10 +341,10 @@ module.exports = class kickCommand extends Command {
|
|||||||
|
|
||||||
Discordeno Version
|
Discordeno Version
|
||||||
```ts
|
```ts
|
||||||
import { sendMessage } from "https://x.nest.land/Discordeno@9.0.1/src/handlers/channel.ts";
|
import { sendMessage } from "https://deno.land/x/discordeno@9.4.0/src/handlers/channel.ts";
|
||||||
import { Member } from "https://x.nest.land/Discordeno@9.0.1/src/structures/member.ts";
|
import { Member } from "https://deno.land/x/discordeno@9.4.0/src/structures/member.ts";
|
||||||
import { kick } from "https://x.nest.land/Discordeno@9.0.1/src/handlers/member.ts";
|
import { kick } from "https://deno.land/x/discordeno@9.4.0/src/handlers/member.ts";
|
||||||
import { deleteMessage } from "https://x.nest.land/Discordeno@9.0.1/src/handlers/message.ts";
|
import { deleteMessage } from "https://deno.land/x/discordeno@9.4.0/src/handlers/message.ts";
|
||||||
import { botCache } from "../../mod.ts";
|
import { botCache } from "../../mod.ts";
|
||||||
import { createCommandAliases, sendResponse } from "../utils/helpers.ts";
|
import { createCommandAliases, sendResponse } from "../utils/helpers.ts";
|
||||||
import { Embed } from "../utils/Embed.ts";
|
import { Embed } from "../utils/Embed.ts";
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ Now you've created an Application but it will need some code in order for it to
|
|||||||
|
|
||||||
You can install Discordeno by importing:
|
You can install Discordeno by importing:
|
||||||
```ts
|
```ts
|
||||||
import Client from "https://x.nest.land/Discordeno@9.0.1/src/module/client.ts";
|
import Client from "https://deno.land/x/discordeno@9.4.0/src/module/client.ts";
|
||||||
```
|
```
|
||||||
|
|
||||||
## Example Usage
|
## Example Usage
|
||||||
@@ -40,7 +40,7 @@ import Client from "https://x.nest.land/Discordeno@9.0.1/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:
|
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
|
```ts
|
||||||
import StartBot, { sendMessage, Intents } from "https://x.nest.land/Discordeno@9.0.1/src/module/client.ts";
|
import StartBot, { sendMessage, Intents } from "https://deno.land/x/discordeno@9.4.0/src/module/client.ts";
|
||||||
import config from "./config.ts";
|
import config from "./config.ts";
|
||||||
|
|
||||||
StartBot({
|
StartBot({
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ Let's first start by taking an existing command and slightly modifying it to you
|
|||||||
|
|
||||||
```ts
|
```ts
|
||||||
import { botCache } from "../../mod.ts";
|
import { botCache } from "../../mod.ts";
|
||||||
import { sendMessage } from "https://x.nest.land/Discordeno@9.0.1/src/handlers/channel.ts";
|
import { sendMessage } from "https://deno.land/x/discordeno@9.4.0/src/handlers/channel.ts";
|
||||||
import { botID } from "https://x.nest.land/Discordeno@9.0.1/src/module/client.ts";
|
import { botID } from "https://deno.land/x/discordeno@9.4.0/src/module/client.ts";
|
||||||
import { createCommand } from "../utils/helpers.ts"
|
import { createCommand } from "../utils/helpers.ts"
|
||||||
|
|
||||||
createCommand({
|
createCommand({
|
||||||
@@ -114,7 +114,7 @@ Let's make a command that will allow guild admins to give or take roles from a m
|
|||||||
|
|
||||||
```ts
|
```ts
|
||||||
import { botCache } from "../../mod.ts";
|
import { botCache } from "../../mod.ts";
|
||||||
import { sendMessage } from "https://x.nest.land/Discordeno@9.0.1/src/handlers/channel.ts";
|
import { sendMessage } from "https://deno.land/x/discordeno@9.4.0/src/handlers/channel.ts";
|
||||||
import { PermissionLevels } from "../types/commands.ts";
|
import { PermissionLevels } from "../types/commands.ts";
|
||||||
import { createCommandAliases } from "../utils/helpers";
|
import { createCommandAliases } from "../utils/helpers";
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ Go ahead and open up the `src/events/ready.ts` file. When you open this file, yo
|
|||||||
|
|
||||||
```ts
|
```ts
|
||||||
import { botCache } from "../../mod.ts";
|
import { botCache } from "../../mod.ts";
|
||||||
import { cache } from "https://x.nest.land/Discordeno@9.0.1/src/utils/cache.ts";
|
import { cache } from "https://deno.land/x/discordeno@9.4.0/src/utils/cache.ts";
|
||||||
|
|
||||||
botCache.eventHandlers.ready = function () {
|
botCache.eventHandlers.ready = function () {
|
||||||
console.log(`Loaded ${botCache.arguments.size} Argument(s)`);
|
console.log(`Loaded ${botCache.arguments.size} Argument(s)`);
|
||||||
|
|||||||
Reference in New Issue
Block a user