From 27759986ad52c799a7724d75fd7669c4113f56c8 Mon Sep 17 00:00:00 2001 From: Waren Gonzaga Date: Wed, 24 May 2023 14:52:07 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=93=9A=20DOCS:=20update=20readme=20in?= =?UTF-8?q?fo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 89 ++----------------------------------------------------- 1 file changed, 3 insertions(+), 86 deletions(-) diff --git a/README.md b/README.md index f487a9a..1a59835 100644 --- a/README.md +++ b/README.md @@ -1,88 +1,5 @@ -# thirdweb Support Bot +# Support Bot -A dedicated forum-based support Discord bot for the thirdweb community. This bot is created specifically for the community setup of thirdweb community. If you want to use the bot would recommend to use the [public version](https://github.com/warengonzaga/forum-based-support-discord-bot) of it. +A dedicated self-hosted forum-based support Discord bot for the thirdweb community. Specifically made for the [thirdweb](https://discord.gg/thirdweb) Discord community server. -## 🤔 How to Use - -This bot has only one command to use, for auto closing the posts from forum channels. - -- Make sure the forum post has tags that is required before posting. -- Add proper permission to the bot to avoid unexpected issues. - -### Commands - -To close thread using prefix command. - -```bash -!close -``` - -To close the thread and resolved by the username mentioned - -```bash -!close @username -``` - -## 🎛️ Configurations - -### Config File - -```json -{ - "resolution_tag_name": "Solved", - "command_prefix": "!", - "utc_offset": -8, - "datasheet_init": "init", - "datasheet_response": "response", - "datasheet_resolve": "resolve", - "mention_message": "Hello there! If you need help, please read the information in <#1074862134284005396> and post your questions or issues in the <#1029543258822553680> channel. Our team and community members are always ready to help you out. Thank you for building with us!" -} -``` - -| Config Name | Description | -| --- | --- | -| `resolution_tag_name` | The name of the tag to mark the post resolved. | -| `command_prefix` | A prefix you want to use with `close` command to be recognized by the bot. | -| `utc_offset` | Time and date UTC offset for recording the data. | -| `datasheet_init` | Refers to the sheet name in your google spreadsheet. This should be the first sheet in the order. | -| `datasheet_response` | Refers to the sheet name in your google spreadsheet. This should be the second sheet in the order. | -| `datasheet_resolve` | Refers to the sheet name in your google spreadsheet. This should be the third sheet in the order. | -| `mention_message` | The message bot will send if the bot mentioned by the user, you can use use the channel ids to mention it within the bot message. | - -## 👁️ Environment Variables - -```env -DISCORD_BOT_TOKEN= -DISCORD_SUPPORT_ROLE_ID=, -GOOGLE_PRIVATE_KEY= -GOOGLE_SERVICE_ACCOUNT_EMAIL= -GOOGLE_SPREADSHEET_ID= -``` - -## 💻 Development - -### Install the packages - -```bash -yarn install -``` - -### Run the bot - -```bash -yarn dev -``` - -## 📃 License - -The Forum-based Support Bot (thirdweb support) is licensed under [GNU General Public License v3](https://opensource.org/licenses/GPL-3.0). - -## 📝 Author - -The Forum-based Support Bot (thirdweb support) is developed and maintained by **[Waren Gonzaga](https://github.com/warengonzaga)**, with the help of awesome [contributors](https://github.com/warengonzaga/thirdweb-support-discord-bot/graphs/contributors) for the [thirdweb community](https://discord.gg/thirdweb). - -[![contributors](https://contrib.rocks/image?repo=warengonzaga/thirdweb-support-discord-bot)](https://github.com/warengonzaga/thirdweb-support-discord-bot/graphs/contributors) - ---- - -💻💖☕ by [Waren Gonzaga](https://warengonzaga.com) | [He is Awesome](https://www.youtube.com/watch?v=HHrxS4diLew&t=44s) 🙏 +> **Note**: If you want to use this bot on your community I would recommend to use the [public version](https://github.com/warengonzaga/forum-based-support-discord-bot) of it. Thank you! From 21285e64650644296e4e8d58774f7049df4bc561 Mon Sep 17 00:00:00 2001 From: Waren Gonzaga Date: Thu, 25 May 2023 07:07:05 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=E2=9C=A8=20TWEAK:=20add=20bug=20data=20to?= =?UTF-8?q?=20init=20event?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/bot.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bot.js b/src/bot.js index 4bbe764..5e7aa74 100644 --- a/src/bot.js +++ b/src/bot.js @@ -322,11 +322,13 @@ client.on('threadCreate', async post => { const resolutionTime = `=IFERROR(VLOOKUP(A2:A,${config.datasheet_resolve}!A2:B,2,0))`; const closeTime = `=IFERROR(VLOOKUP(A2:A,${config.datasheet_close}!A2:B,2,0))`; const escalationTime = `=IFERROR(VLOOKUP(A2:A,${config.datasheet_escalate}!A2:B,2,0))`; + const bugTime = `=IFERROR(VLOOKUP(A2:A,${config.datasheet_bug}!A2:B,2,0))`; const responder = `=IFERROR(VLOOKUP(A2:A,{${config.datasheet_response}!A2:A,${config.datasheet_response}!C2:C},2,0))`; const resolvedBy = `=IFERROR(VLOOKUP(A2:A,{${config.datasheet_resolve}!A2:A,${config.datasheet_resolve}!C2:C},2,0))`; const closedBy = `=IFERROR(VLOOKUP(A2:A,{${config.datasheet_close}!A2:A,${config.datasheet_close}!C2:C},2,0))`; const escalatedBy = `=IFERROR(VLOOKUP(A2:A,{${config.datasheet_escalate}!A2:A,${config.datasheet_escalate}!C2:C},2,0))`; const escalationLink = `=IFERROR(VLOOKUP(A2:A,{${config.datasheet_escalate}!A2:A,${config.datasheet_escalate}!D2:D},2,0))`; + const bugBy = `=IFERROR(VLOOKUP(A2:A,{${config.datasheet_bug}!A2:A,${config.datasheet_bug}!C2:C},2,0))`; // send the data sendData({ @@ -345,6 +347,8 @@ client.on('threadCreate', async post => { escalation_time: escalationTime, escalated_by: escalatedBy, escalation_link: escalationLink, + bug_time: bugTime, + bug_by: bugBy }, config.datasheet_init); });