anipalur / anipalur/gce-a-levels-bot

Use strings instead of IDs for `getLogsThread()`

Đang mở
#13 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement good first issue
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

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.