Update: utility method logs use method name

This commit is contained in:
JT2M0L3Y
2026-07-17 12:01:24 -07:00
parent 3d6d651e18
commit e09a47bd43
3 changed files with 10 additions and 10 deletions
+2 -2
View File
@@ -112,7 +112,7 @@ export async function accessChannelContext(filename: string, callback: (config:
* @param user the user's name
* @param messages their messages
*/
export async function openChannelInfo(filename: string, channel: TextChannel | ThreadChannel, user: string, messages: UserMessage[] = []): Promise<void> {
export async function openChannelInfo(this: any, filename: string, channel: TextChannel | ThreadChannel, user: string, messages: UserMessage[] = []): Promise<void> {
const fullFileName = `data/${filename}-${user}.json`
if (fs.existsSync(fullFileName)) {
fs.readFile(fullFileName, 'utf8', (error, data) => {
@@ -143,7 +143,7 @@ export async function openChannelInfo(filename: string, channel: TextChannel | T
// only creating it, no need to add anything
fs.writeFileSync(fullFileName, JSON.stringify(object, null, 2))
console.log(`[Util: openChannelInfo] Created '${fullFileName}' in working directory`)
console.log(`[Util: ${this.name}] Created '${fullFileName}' in working directory`)
}
}