anipalur / anipalur/gce-a-levels-bot
Use strings instead of IDs for `getLogsThread()`
- Dominant language
- JavaScript
- Stars
- 1
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
### Discord Username
Not specified.
### Related Problem
As of now, [`botLogsChannelId`](https://github.com/anipalur/gce-a-levels-bot/blob/79c543970c4fd6cbaa94b9683e944362fa0154a8/src/config/channels-example.json#L3 "View where botLogsChannelId is defined.") and a logs thread ID must be passed when calling [`getLogsThread()`](https://github.com/anipalur/gce-a-levels-bot/blob/79c543970c4fd6cbaa94b9683e944362fa0154a8/src/tools/get-logs-thread.js#L12 "View the getLogsThread function file."). These IDs must be imported in every file the function is used in.
### Enhancement Description
Use a string parameter to specify the logs thread. This string is used to reference the corresponding logs thread ID.
For example, instead of
```js
const serverLogsThread = getLogsThread(client, botLogsChannelId, serverLogsThreadId);
```
call `getLogsThread()` like this:
```js
const serverLogsThread = getLogsThread(client, 'server-logs');
```
### Additional Information
None.
### Code of Conduct
- [X] I agree to abide by the Code of Conduct.
Contributor guide
Assessment
This issue has not been assessed yet.