mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 03:18:17 +00:00
change: import types from specific files (#953)
* fix: import types from specific files * Use import syntax for enums
This commit is contained in:
@@ -2,7 +2,7 @@ import { eventHandlers } from "../../bot.ts";
|
|||||||
import { cacheHandlers } from "../../cache.ts";
|
import { cacheHandlers } from "../../cache.ts";
|
||||||
import { structures } from "../../structures/mod.ts";
|
import { structures } from "../../structures/mod.ts";
|
||||||
import type { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
import type { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||||
import type { GuildRoleCreate } from "../../types/mod.ts";
|
import type { GuildRoleCreate } from "../../types/guilds/guild_role_create.ts";
|
||||||
import { snowflakeToBigint } from "../../util/bigint.ts";
|
import { snowflakeToBigint } from "../../util/bigint.ts";
|
||||||
|
|
||||||
export async function handleGuildRoleCreate(data: DiscordGatewayPayload) {
|
export async function handleGuildRoleCreate(data: DiscordGatewayPayload) {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { eventHandlers } from "../../bot.ts";
|
|||||||
import { cacheHandlers } from "../../cache.ts";
|
import { cacheHandlers } from "../../cache.ts";
|
||||||
import { structures } from "../../structures/mod.ts";
|
import { structures } from "../../structures/mod.ts";
|
||||||
import type { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
import type { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||||
import type { GuildRoleUpdate } from "../../types/mod.ts";
|
import type { GuildRoleUpdate } from "../../types/guilds/guild_role_update.ts";
|
||||||
import { snowflakeToBigint } from "../../util/bigint.ts";
|
import { snowflakeToBigint } from "../../util/bigint.ts";
|
||||||
|
|
||||||
export async function handleGuildRoleUpdate(data: DiscordGatewayPayload) {
|
export async function handleGuildRoleUpdate(data: DiscordGatewayPayload) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { cacheHandlers } from "../../cache.ts";
|
import { cacheHandlers } from "../../cache.ts";
|
||||||
import { rest } from "../../rest/rest.ts";
|
import { rest } from "../../rest/rest.ts";
|
||||||
import { Errors } from "../../types/discordeno/errors.ts";
|
import { Errors } from "../../types/discordeno/errors.ts";
|
||||||
import { ChannelTypes } from "../../types/mod.ts";
|
import { ChannelTypes } from "../../types/channels/channel_types.ts";
|
||||||
import { endpoints } from "../../util/constants.ts";
|
import { endpoints } from "../../util/constants.ts";
|
||||||
import { requireBotGuildPermissions } from "../../util/permissions.ts";
|
import { requireBotGuildPermissions } from "../../util/permissions.ts";
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { cacheHandlers } from "../../../cache.ts";
|
import { cacheHandlers } from "../../../cache.ts";
|
||||||
import { rest } from "../../../rest/rest.ts";
|
import { rest } from "../../../rest/rest.ts";
|
||||||
import { ChannelTypes, Errors } from "../../../types/mod.ts";
|
import { ChannelTypes } from "../../../types/channels/channel_types.ts";
|
||||||
|
import { Errors } from "../../../types/discordeno/errors.ts";
|
||||||
import { endpoints } from "../../../util/constants.ts";
|
import { endpoints } from "../../../util/constants.ts";
|
||||||
//TODO(threads): this does not work rn
|
//TODO(threads): this does not work rn
|
||||||
/** Adds the current user to a thread. Returns a 204 empty response on success. Also requires the thread is not archived. Fires a Thread Members Update Gateway event.Adds another user to a thread. Requires the ability to send messages in the thread. Also requires the thread is not archived. Returns a 204 empty response on success. Fires a Thread Members Update Gateway event.
|
/** Adds the current user to a thread. Returns a 204 empty response on success. Also requires the thread is not archived. Fires a Thread Members Update Gateway event.Adds another user to a thread. Requires the ability to send messages in the thread. Also requires the thread is not archived. Returns a 204 empty response on success. Fires a Thread Members Update Gateway event.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { rest } from "../../rest/rest.ts";
|
import { rest } from "../../rest/rest.ts";
|
||||||
import type { WelcomeScreen } from "../../types/mod.ts";
|
import type { WelcomeScreen } from "../../types/guilds/welcome_screen.ts";
|
||||||
import { endpoints } from "../../util/constants.ts";
|
import { endpoints } from "../../util/constants.ts";
|
||||||
|
|
||||||
export async function getWelcomeScreen(guildId: bigint) {
|
export async function getWelcomeScreen(guildId: bigint) {
|
||||||
|
|||||||
Reference in New Issue
Block a user