joeldesante / Harvey

Community managment Discord bot for the Old Dominion University Computer Science community.
GNU General Public License v3.0
6 stars 4 forks source link

Switch to Typescript #62

Closed malakhite closed 1 year ago

malakhite commented 1 year ago

Closes #43

malakhite commented 1 year ago

@joeldesante I'm not able to reproduce this locally. Can you describe the steps you took to create the error?

joeldesante commented 1 year ago

@malakhite

I just re-cloned the branch and it seems to be working fine now. Im not sure what the issue was before. I'm going to continue testing this branch and then once everything is fine I'll merge! Thanks for the help on this ticket!

joeldesante commented 1 year ago

Logging this error:

Executing (default): SELECT `id`, `guildId`, `roleSelectionChannelId`, `courseChatCategoryId`, `createdAt`, `updatedAt` FROM `CourseRolesSettings` AS `CourseRolesSetting` WHERE `CourseRolesSetting`.`guildId` = '987851629162287204';

error: unhandledRejection: joinMessageChannel?.isText is not a function

TypeError: joinMessageChannel?.isText is not a function
    at createCourseChannel (/Users/jdesante/Development/Harvey/src/lib/courseChannels.ts:50:30)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Object.onTriggered (/Users/jdesante/Development/Harvey/src/commands/createCourse.ts:23:9)
    at async Client.<anonymous> (/Users/jdesante/Development/Harvey/src/discordClient.ts:24:17) {"date":"Fri Apr 14 2023 13:40:13 GMT-0400 (Eastern Daylight Time)","error":{},"exception":true,"os":{"loadavg":[3.166015625,3.0263671875,3.18994140625],"uptime":916402},"process":{"argv":["/Users/jdesante/Development/Harvey/node_modules/.bin/ts-node","/Users/jdesante/Development/Harvey/src/index.ts"],"cwd":"/Users/jdesante/Development/Harvey","execPath":"/usr/local/bin/node","gid":20,"memoryUsage":{"arrayBuffers":910506,"external":2518484,"heapTotal":199524352,"heapUsed":192908072,"rss":259997696},"pid":44370,"uid":504,"version":"v16.17.0"},"stack":"TypeError: joinMessageChannel?.isText is not a function\n    at createCourseChannel (/Users/jdesante/Development/Harvey/src/lib/courseChannels.ts:50:30)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)\n    at async Object.onTriggered (/Users/jdesante/Development/Harvey/src/commands/createCourse.ts:23:9)\n    at async Client.<anonymous> (/Users/jdesante/Development/Harvey/src/discordClient.ts:24:17)","trace":[{"column":30,"file":"/Users/jdesante/Development/Harvey/src/lib/courseChannels.ts","function":"createCourseChannel","line":50,"method":null,"native":false},{"column":5,"file":"node:internal/process/task_queues","function":"processTicksAndRejections","line":96,"method":null,"native":false},{"column":9,"file":"/Users/jdesante/Development/Harvey/src/commands/createCourse.ts","function":"async Object.onTriggered","line":23,"method":"onTriggered","native":false},{"column":17,"file":"/Users/jdesante/Development/Harvey/src/discordClient.ts","function":null,"line":24,"method":null,"native":false}]}

Steps to recreate

Run /set-course-role-channel role-channel: #choose-course parent-category: #courses in discord

Edit

Now its working fine. I dont know what changed or why its decided to work now but its seems to be fine.