Prettified Code!

This commit is contained in:
itohatweb
2021-05-21 15:51:33 +00:00
committed by GitHub Action
parent fe4ab8517b
commit 3549cdeb63
279 changed files with 1617 additions and 1768 deletions
+4 -6
View File
@@ -1,8 +1,6 @@
import { rest } from "../../rest/rest.ts";
import { UpdateOthersVoiceState } from "../../types/guilds/update_others_voice_state.ts";
import type {
UpdateSelfVoiceState,
} from "../../types/guilds/update_self_voice_state.ts";
import type { UpdateSelfVoiceState } from "../../types/guilds/update_self_voice_state.ts";
import { endpoints } from "../../util/constants.ts";
import { hasOwnProperty, snakelize } from "../../util/utils.ts";
@@ -19,14 +17,14 @@ import { hasOwnProperty, snakelize } from "../../util/utils.ts";
*/
export async function updateBotVoiceState(
guildId: bigint,
options: UpdateSelfVoiceState | { userId: bigint } & UpdateOthersVoiceState,
options: UpdateSelfVoiceState | ({ userId: bigint } & UpdateOthersVoiceState)
) {
return await rest.runMethod(
"patch",
endpoints.UPDATE_VOICE_STATE(
guildId,
hasOwnProperty(options, "userId") ? options.userId : undefined,
hasOwnProperty(options, "userId") ? options.userId : undefined
),
snakelize(options),
snakelize(options)
);
}