fix some errors

This commit is contained in:
ITOH
2021-04-30 21:53:17 +02:00
parent 9aad8c257e
commit 208b098ba2
4 changed files with 8 additions and 14 deletions
@@ -1,9 +1,9 @@
import { rest } from "../../rest/rest.ts";
import { DiscordValidateDiscoverySearchTerm } from "../../types/discovery/validate_discovery_search_term.ts";
import { ValidateDiscoverySearchTerm } from "../../types/discovery/validate_discovery_search_term.ts";
import { endpoints } from "../../util/constants.ts";
export async function validDiscoveryTerm(term: string) {
const result = await rest.runMethod<DiscordValidateDiscoverySearchTerm>(
const result = await rest.runMethod<ValidateDiscoverySearchTerm>(
"get",
endpoints.DISCOVERY_VALID_TERM,
{ term },
+2 -2
View File
@@ -4,7 +4,7 @@ import { structures } from "../../structures/mod.ts";
import { DiscordChannelTypes } from "../../types/channels/channel_types.ts";
import { DiscordAllowedMentionsTypes } from "../../types/messages/allowed_mentions_types.ts";
import { CreateMessage } from "../../types/messages/create_message.ts";
import { DiscordMessage, Message } from "../../types/messages/message.ts";
import { Message } from "../../types/messages/message.ts";
import { Errors } from "../../types/misc/errors.ts";
import { PermissionStrings } from "../../types/permissions/permission_strings.ts";
import { endpoints } from "../../util/constants.ts";
@@ -96,7 +96,7 @@ export async function sendMessage(
const result = await rest.runMethod<Message>(
"post",
endpoints.CHANNEL_MESSAGES(channelId),
camelKeysToSnakeCase<DiscordMessage>({
camelKeysToSnakeCase({
...content,
...(content.messageReference?.messageId
? {