mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
new std
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import { Message, createMessage } from "../structures/message.ts";
|
import { Message, createMessage } from "../structures/message.ts";
|
||||||
import { delay } from "https://deno.land/std@0.61.0/async/delay.ts";
|
import { delay } from "https://deno.land/std@0.67.0/async/delay.ts";
|
||||||
import { botID } from "../module/client.ts";
|
import { botID } from "../module/client.ts";
|
||||||
import { Permissions } from "../types/permission.ts";
|
import { Permissions } from "../types/permission.ts";
|
||||||
import { Errors } from "../types/errors.ts";
|
import { Errors } from "../types/errors.ts";
|
||||||
|
|||||||
@@ -8,12 +8,12 @@ import {
|
|||||||
botGatewayData,
|
botGatewayData,
|
||||||
IdentifyPayload,
|
IdentifyPayload,
|
||||||
} from "./client.ts";
|
} from "./client.ts";
|
||||||
import { delay } from "https://deno.land/std@0.61.0/async/delay.ts";
|
import { delay } from "https://deno.land/std@0.67.0/async/delay.ts";
|
||||||
import {
|
import {
|
||||||
connectWebSocket,
|
connectWebSocket,
|
||||||
isWebSocketCloseEvent,
|
isWebSocketCloseEvent,
|
||||||
WebSocket,
|
WebSocket,
|
||||||
} from "https://deno.land/std@0.61.0/ws/mod.ts";
|
} from "https://deno.land/std@0.67.0/ws/mod.ts";
|
||||||
import { DiscordHeartbeatPayload } from "../types/discord.ts";
|
import { DiscordHeartbeatPayload } from "../types/discord.ts";
|
||||||
import { logRed } from "../utils/logger.ts";
|
import { logRed } from "../utils/logger.ts";
|
||||||
import { handleDiscordPayload } from "./shardingManager.ts";
|
import { handleDiscordPayload } from "./shardingManager.ts";
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { RequestMethod } from "../types/fetch.ts";
|
import { RequestMethod } from "../types/fetch.ts";
|
||||||
import { authorization, eventHandlers } from "./client.ts";
|
import { authorization, eventHandlers } from "./client.ts";
|
||||||
import { delay } from "https://deno.land/std@0.61.0/async/delay.ts";
|
import { delay } from "https://deno.land/std@0.67.0/async/delay.ts";
|
||||||
import { Errors } from "../types/errors.ts";
|
import { Errors } from "../types/errors.ts";
|
||||||
import { HttpResponseCode } from "../types/discord.ts";
|
import { HttpResponseCode } from "../types/discord.ts";
|
||||||
import { logRed } from "../utils/logger.ts";
|
import { logRed } from "../utils/logger.ts";
|
||||||
|
|||||||
+2
-2
@@ -2,7 +2,7 @@ import {
|
|||||||
connectWebSocket,
|
connectWebSocket,
|
||||||
isWebSocketCloseEvent,
|
isWebSocketCloseEvent,
|
||||||
WebSocket,
|
WebSocket,
|
||||||
} from "https://deno.land/std@0.61.0/ws/mod.ts";
|
} from "https://deno.land/std@0.67.0/ws/mod.ts";
|
||||||
import {
|
import {
|
||||||
GatewayOpcode,
|
GatewayOpcode,
|
||||||
DiscordBotGatewayData,
|
DiscordBotGatewayData,
|
||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
} from "../types/discord.ts";
|
} from "../types/discord.ts";
|
||||||
import { logRed } from "../utils/logger.ts";
|
import { logRed } from "../utils/logger.ts";
|
||||||
import { FetchMembersOptions } from "../types/guild.ts";
|
import { FetchMembersOptions } from "../types/guild.ts";
|
||||||
import { delay } from "https://deno.land/std@0.61.0/async/delay.ts";
|
import { delay } from "https://deno.land/std@0.67.0/async/delay.ts";
|
||||||
import { DebugArg } from "../types/options.ts";
|
import { DebugArg } from "../types/options.ts";
|
||||||
|
|
||||||
let shardSocket: WebSocket;
|
let shardSocket: WebSocket;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import {
|
|||||||
setBotID,
|
setBotID,
|
||||||
IdentifyPayload,
|
IdentifyPayload,
|
||||||
} from "./client.ts";
|
} from "./client.ts";
|
||||||
import { delay } from "https://deno.land/std@0.61.0/async/delay.ts";
|
import { delay } from "https://deno.land/std@0.67.0/async/delay.ts";
|
||||||
import {
|
import {
|
||||||
handleInternalChannelCreate,
|
handleInternalChannelCreate,
|
||||||
handleInternalChannelUpdate,
|
handleInternalChannelUpdate,
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@ import { Collection } from "./collection.ts";
|
|||||||
import { Message } from "../structures/message.ts";
|
import { Message } from "../structures/message.ts";
|
||||||
import { Guild } from "../structures/guild.ts";
|
import { Guild } from "../structures/guild.ts";
|
||||||
import { Channel } from "../structures/channel.ts";
|
import { Channel } from "../structures/channel.ts";
|
||||||
import { delay } from "https://deno.land/std@0.61.0/async/delay.ts";
|
import { delay } from "https://deno.land/std@0.67.0/async/delay.ts";
|
||||||
import { PresenceUpdatePayload } from "../types/discord.ts";
|
import { PresenceUpdatePayload } from "../types/discord.ts";
|
||||||
|
|
||||||
export interface CacheData {
|
export interface CacheData {
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ import {
|
|||||||
green,
|
green,
|
||||||
red,
|
red,
|
||||||
yellow,
|
yellow,
|
||||||
} from "https://deno.land/std@0.61.0/fmt/colors.ts";
|
} from "https://deno.land/std@0.67.0/fmt/colors.ts";
|
||||||
|
|
||||||
export const getTime = () => {
|
export const getTime = () => {
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
import { StatusType } from "../types/discord.ts";
|
import { StatusType } from "../types/discord.ts";
|
||||||
import { ActivityType } from "../types/activity.ts";
|
import { ActivityType } from "../types/activity.ts";
|
||||||
import { sendGatewayCommand } from "../module/shardingManager.ts";
|
import { sendGatewayCommand } from "../module/shardingManager.ts";
|
||||||
import { encode } from "https://deno.land/std@0.61.0/encoding/base64.ts";
|
import { encode } from "https://deno.land/std@0.67.0/encoding/base64.ts";
|
||||||
|
|
||||||
export const sleep = (timeout: number) => {
|
export const sleep = (timeout: number) => {
|
||||||
return new Promise((resolve) => setTimeout(resolve, timeout));
|
return new Promise((resolve) => setTimeout(resolve, timeout));
|
||||||
|
|||||||
Reference in New Issue
Block a user