Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create issue templates #55

Open
wants to merge 10 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Bug report
about: Create a report to help us improve Hoosky Bot
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Run '...' command
2. Type '....'

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for Hoosky Bot
title: ''
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
4 changes: 2 additions & 2 deletions src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class Client {
*
* @param commands The commands to use.
*/
handleCommands(commands: Command[]): void {
setCommands(commands: Command[]): void {
// Create a map of names and the corresponding commands.
const mapping: Record<string, Command> = {};
for (const cmd of commands) {
Expand All @@ -100,7 +100,7 @@ class Client {
*
* @param triggers The triggers to use.
*/
handleTriggers(triggers: Trigger<any>[]): void {
setTriggers(triggers: Trigger<any>[]): void {
const map: Partial<Record<string, Trigger<any>[]>> = {};
for (const t of triggers) {
if (!map[t.event]) {
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ import interactions from './interactions';
});

// Supply the commands we'd like to handle.
client.handleCommands(commands);
client.setCommands(commands);
// Supply the triggers we'd like to handle.
client.handleTriggers([...triggers, ...cache.triggers()]);
client.setTriggers([...triggers, ...cache.triggers()]);

client.connect().then(data => {
console.log(
Expand Down