anipalur / anipalur/gce-a-levels-bot
Use strings instead of IDs for `getLogsThread()`
- Ngôn ngữ chính
- JavaScript
- Star
- 1
- Fork
- 1
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
### 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.
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.