-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
543 additions
and
746 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import client from '../client'; | ||
import { ChannelType, Events } from 'discord.js'; | ||
|
||
const cannedResponses = new Map([ | ||
[ | ||
'Ultramarine Linux', | ||
`Hewwo! If you haven't already, please make sure to provide the following: | ||
* Version and edition of Ultramrine (ex. Ultramarine 40 KDE) | ||
* Any relavant hardware details, especially if using a port of Ultramarine (ex. Chromebooks) | ||
* Age of the install (ex. 1 week old) | ||
* Any recent changes made to the system (ex. updates, new software, etc.) | ||
* Any error messages you're seeing | ||
* Any steps you've already taken to try and resolve the issue | ||
* Any other relevant information | ||
This will help us help you faster! :3`, | ||
], | ||
]); | ||
|
||
client.on(Events.ThreadCreate, async (thread) => { | ||
if ( | ||
!( | ||
thread.parent?.type === ChannelType.GuildForum && | ||
thread.parent.id === process.env.SUPPORT_FORUM_ID! | ||
) | ||
) { | ||
return; | ||
} | ||
|
||
const entry = Array.from(cannedResponses.entries()).find(([tag]) => | ||
thread.appliedTags.includes(tag), | ||
); | ||
if (!entry) return; | ||
|
||
await thread.send(entry[1]); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters