mirror of
https://github.com/discordeno/discordeno.git
synced 2026-05-29 23:10:07 +00:00
fix: add client.editStatus()
This commit is contained in:
@@ -151,12 +151,14 @@ import type PermissionOverwrite from './Structures/PermissionOverwrite.js'
|
||||
import ExtendedUser from './Structures/users/Extended.js'
|
||||
import User from './Structures/users/User.js'
|
||||
import type {
|
||||
ActivityPartial,
|
||||
AllowedMentions,
|
||||
AnyChannel,
|
||||
AnyGuildChannel,
|
||||
ApplicationCommand,
|
||||
ApplicationCommandPermissions,
|
||||
ApplicationCommandStructure,
|
||||
BotActivityType,
|
||||
ChannelFollow,
|
||||
ChannelPosition,
|
||||
CreateChannelInviteOptions,
|
||||
@@ -200,6 +202,7 @@ import type {
|
||||
PruneMemberOptions,
|
||||
PurgeChannelOptions,
|
||||
RoleOptions,
|
||||
SelfStatus,
|
||||
StageInstanceOptions,
|
||||
Sticker,
|
||||
StickerPack,
|
||||
@@ -1340,6 +1343,13 @@ export class Client extends EventEmitter {
|
||||
}).then((instance) => new StageInstance(instance, this))
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the bot's status on all guilds the shard is in
|
||||
*/
|
||||
async editStatus(status: SelfStatus, activities: Array<ActivityPartial<BotActivityType>> | ActivityPartial<BotActivityType> = []) {
|
||||
return await Promise.all(this.shards.map(async (shard) => await shard.editStatus(status, activities)))
|
||||
}
|
||||
|
||||
/** Edit a webhook */
|
||||
async editWebhook(webhookID: BigString, options: WebhookOptions, token: string, reason?: string) {
|
||||
return await this.patch(token ? WEBHOOK_TOKEN(webhookID, token) : WEBHOOK(webhookID), {
|
||||
|
||||
Reference in New Issue
Block a user