File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
backend/src/plugin/logging/helper Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1+ import { APP_NAME } from "#brand.ts" ;
12import { fetchTextableGuildChannelCached } from "#common/discord/cachedRequest.ts" ;
23import { isThreadChannel } from "#common/discord/general.ts" ;
34import { bot } from "#discord/index.ts" ;
@@ -21,7 +22,7 @@ export async function logToChannel(channel: AnyTextableGuildChannel, message: Ex
2122 message . threadID = channel . id ;
2223
2324 await bot . rest . webhooks . execute ( webhookID , token , {
24- username : ( bot . user . globalName ?? bot . user . username ) + " Logging" ,
25+ username : APP_NAME + " Logging" ,
2526 avatarURL : bot . user . avatarURL ( ) ,
2627 ...message ,
2728 } ) ;
@@ -57,7 +58,7 @@ async function acquireWebhook(channel: AnyTextableGuildChannel, action: (auth: W
5758 if ( ! baseChannel . permissionsOf ( channel . guild . clientMember ) . has ( Permissions . MANAGE_WEBHOOKS ) )
5859 return ;
5960
60- const webhook = await baseChannel . createWebhook ( { name : "Squirrel Logging Webhook" } ) ;
61+ const webhook = await baseChannel . createWebhook ( { name : APP_NAME + " Logging Webhook" } ) ;
6162 const auth : WebhookAuth = { webhookID : webhook . id , token : webhook . token ! } ;
6263
6364 if ( existingWebhook !== null )
You can’t perform that action at this time.
0 commit comments