mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 16:57:22 +00:00
perf(plugins/helpers,rest,site,template)!: uppercase rest methods (#2252)
* perf(plugins/helpers,rest,site,template)!: uppercase rest methods There is no need for us to pass the methods in lower case and then use the `toUpperCase()` method everywhere. Therefore this PR changes every lowercase method to be uppercase (eg. `"get"` => `"GET"`). * template is old version
This commit is contained in:
@@ -32,7 +32,7 @@ export async function getMembersPaginated(
|
||||
|
||||
const result = await bot.rest.runMethod<DiscordMemberWithUser[]>(
|
||||
bot.rest,
|
||||
"get",
|
||||
"GET",
|
||||
bot.constants.routes.GUILD_MEMBERS(guildId, {
|
||||
limit: membersLeft > 1000 ? 1000 : membersLeft,
|
||||
after: options.after,
|
||||
|
||||
@@ -8,7 +8,7 @@ export async function suppressEmbeds(
|
||||
) {
|
||||
const result = await bot.rest.runMethod<DiscordMessage>(
|
||||
bot.rest,
|
||||
"patch",
|
||||
"PATCH",
|
||||
bot.constants.routes.CHANNEL_MESSAGE(channelId, messageId),
|
||||
{ flags: 4 },
|
||||
);
|
||||
|
||||
@@ -24,7 +24,7 @@ export async function unlockThread(bot: Bot, threadId: bigint) {
|
||||
export async function editThread(bot: Bot, threadId: bigint, options: ModifyThread, reason?: string) {
|
||||
const result = await bot.rest.runMethod<DiscordChannel>(
|
||||
bot.rest,
|
||||
"patch",
|
||||
"PATCH",
|
||||
bot.constants.routes.CHANNEL(threadId),
|
||||
{
|
||||
name: options.name,
|
||||
|
||||
Reference in New Issue
Block a user