mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
Add reason to followAnnouncement (#3622)
This commit is contained in:
@@ -925,11 +925,12 @@ export function createRestManager(options: CreateRestManagerOptions): RestManage
|
||||
return await rest.post<DiscordMessage>(rest.routes.webhooks.webhook(webhookId, token, options), { body: options })
|
||||
},
|
||||
|
||||
async followAnnouncement(sourceChannelId, targetChannelId) {
|
||||
async followAnnouncement(sourceChannelId, targetChannelId, reason) {
|
||||
return await rest.post<DiscordFollowedChannel>(rest.routes.channels.follow(sourceChannelId), {
|
||||
body: {
|
||||
webhook_channel_id: targetChannelId,
|
||||
},
|
||||
reason,
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
@@ -1502,6 +1502,7 @@ export interface RestManager {
|
||||
*
|
||||
* @param sourceChannelId - The ID of the announcement channel to follow.
|
||||
* @param targetChannelId - The ID of the target channel - the channel to cross-post to.
|
||||
* @param {string} [reason] - An optional reason for the action, to be included in the audit log.
|
||||
* @returns An instance of {@link CamelizedDiscordFollowedChannel}.
|
||||
*
|
||||
* @remarks
|
||||
@@ -1511,7 +1512,7 @@ export interface RestManager {
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/channel#follow-announcement-channel}
|
||||
*/
|
||||
followAnnouncement: (sourceChannelId: BigString, targetChannelId: BigString) => Promise<CamelizedDiscordFollowedChannel>
|
||||
followAnnouncement: (sourceChannelId: BigString, targetChannelId: BigString, reason?: string) => Promise<CamelizedDiscordFollowedChannel>
|
||||
/**
|
||||
* Gets the list of all active threads for a guild.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user