anipalur / anipalur/gce-a-levels-bot

Use strings instead of IDs for `getLogsThread()`

Open
#13 0 comments 0 reactions 0 assignees View on GitHub
enhancement good first issue
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.