mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-02 00:40:07 +00:00
Use import type
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import type { CreateGuildRole } from "../../types/guilds/create_guild_role.ts";
|
||||
import type { Role } from "../../types/permissions/role.ts";
|
||||
import type {Bot} from "../../bot.ts";
|
||||
import {SnakeCasedPropertiesDeep} from "../../types/util.ts";
|
||||
import type {SnakeCasedPropertiesDeep} from "../../types/util.ts";
|
||||
|
||||
/** Create a new role for the guild. Requires the MANAGE_ROLES permission. */
|
||||
export async function createRole(bot: Bot, guildId: bigint, options: CreateGuildRole, reason?: string) {
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { Message } from "../../types/messages/message.ts";
|
||||
import type { EditWebhookMessage } from "../../types/webhooks/edit_webhook_message.ts";
|
||||
import type {Bot} from "../../bot.ts";
|
||||
import {DiscordAllowedMentionsTypes} from "../../types/messages/allowed_mentions_types.ts";
|
||||
import {SnakeCasedPropertiesDeep} from "../../types/util.ts";
|
||||
import type {SnakeCasedPropertiesDeep} from "../../types/util.ts";
|
||||
|
||||
export async function editWebhookMessage(
|
||||
bot: Bot,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { ModifyWebhook } from "../../types/webhooks/modify_webhook.ts";
|
||||
import type { Webhook } from "../../types/webhooks/webhook.ts";
|
||||
import type {Bot} from "../../bot.ts";
|
||||
import {SnakeCasedPropertiesDeep} from "../../types/util.ts";
|
||||
import type {SnakeCasedPropertiesDeep} from "../../types/util.ts";
|
||||
|
||||
/** Edit a webhook. Returns the updated webhook object on success. */
|
||||
export async function editWebhookWithToken(
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { Webhook } from "../../types/webhooks/webhook.ts";
|
||||
import type {Bot} from "../../bot.ts";
|
||||
import {SnakeCasedPropertiesDeep} from "../../types/util.ts";
|
||||
import type {SnakeCasedPropertiesDeep} from "../../types/util.ts";
|
||||
|
||||
/** Returns the new webhook object for the given id. */
|
||||
export async function getWebhook(bot: Bot, webhookId: bigint) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { Message } from "../../types/messages/message.ts";
|
||||
import {SnakeCasedPropertiesDeep} from "../../types/util.ts";
|
||||
import type {SnakeCasedPropertiesDeep} from "../../types/util.ts";
|
||||
import type {Bot} from "../../bot.ts";
|
||||
|
||||
/** Returns a previously-sent webhook message from the same token. Returns a message object on success. */
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type {Bot} from "../../bot.ts";
|
||||
import type { Webhook } from "../../types/webhooks/webhook.ts";
|
||||
import { Collection } from "../../util/collection.ts";
|
||||
import {SnakeCasedPropertiesDeep} from "../../types/util.ts";
|
||||
import type {SnakeCasedPropertiesDeep} from "../../types/util.ts";
|
||||
|
||||
/** Returns a list of guild webhooks objects. Requires the MANAGE_WEBHOOKs permission. */
|
||||
export async function getWebhooks(bot: Bot, guildId: bigint) {
|
||||
|
||||
@@ -2,7 +2,7 @@ import type {Bot} from "../../bot.ts";
|
||||
import { DiscordAllowedMentionsTypes } from "../../types/messages/allowed_mentions_types.ts";
|
||||
import type { Message } from "../../types/messages/message.ts";
|
||||
import type { ExecuteWebhook } from "../../types/webhooks/execute_webhook.ts";
|
||||
import {SnakeCasedPropertiesDeep} from "../../types/util.ts";
|
||||
import type {SnakeCasedPropertiesDeep} from "../../types/util.ts";
|
||||
|
||||
/** Send a webhook with webhook Id and webhook token */
|
||||
export async function sendWebhook(bot: Bot, webhookId: bigint, webhookToken: string, options: ExecuteWebhook) {
|
||||
|
||||
Reference in New Issue
Block a user