diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 0000000..9f527fa --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,24 @@ +on: + push: + branches: + - master + +permissions: + contents: write + pull-requests: write + +name: release-please + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: google-github-actions/release-please-action@v4 + with: + # this assumes that you have created a personal access token + # (PAT) and configured it as a GitHub action secret named + # `MY_RELEASE_PLEASE_TOKEN` (this secret name is not important). + token: ${{ secrets.REALEASE_TOKEN }} + # this is a built-in strategy in release-please, see "Action Inputs" + # for more options + release-type: si diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..e69de29 diff --git a/README.md b/README.md index 9317068..1589fcd 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ Status: In Development 🛠️ +Latest: 0.0.1 + 🤖 Description: BingusBoingus is the bot you never knew you needed, mainly because it doesn't exist yet! This Discord bot repository is currently just a twinkle in the eyes of our imaginary developers. With BingusBoingus, expect the unexpected, and prepare for some hilariously quirky and utterly pointless commands that will make you wonder, "Why does this bot even exist?" 🪄 Features (not really): -Commandless Command: Our bot's most advanced feature is the absence of commands. Yes, you read that right; it does nothing, and it does it superbly... Because it doesn't exist yet - Random Responses: BingusBoingus excels at delivering responses that are both baffling and comical. Ask it a question, and you might get a recipe for mashed potatoes in return. Virtual Tea Party: Join the bot in its daily virtual tea party where it discusses the weather with itself. @@ -33,10 +33,14 @@ Stay tuned for more updates on BingusBoingus, the Discord bot that's sillier tha This repository follows a structured Git branching workflow: - Branch Creation: Start a new branch for each feature or bug fix. -- [Commits](CONTRIBUTING.md#git-commit-type): Make changes and commit with clear messages following the conventional commit messages. -- [Pull Request](CONTRIBUTING.md#submitting-a-pull-request): Create a PR to merge changes, explaining the purpose. +- Commits: Make changes and commit with clear messages following the conventional commit messages. +- Pull Request: Create a PR to merge changes, explaining the purpose. - Review: Collaborators review code, provide feedback. - Iterations: Address feedback, make necessary adjustments. - Merge: Approved changes are merged into the dev branch. This workflow ensures organized and collaborative development. + +for more information on contributing and conventional commits please visit the [Github Contributing Docs.](https://github.com/github/docs/blob/main/CONTRIBUTING.md) + +Built with [NestJs](https://github.com/nestjs) diff --git a/src/assets/bingus.png b/src/assets/bingus.png new file mode 100644 index 0000000..f894c5d Binary files /dev/null and b/src/assets/bingus.png differ diff --git a/src/assets/spoingus.png b/src/assets/spoingus.png new file mode 100644 index 0000000..f4a2963 Binary files /dev/null and b/src/assets/spoingus.png differ diff --git a/src/modules/event/event.abstract.ts b/src/modules/event/event.abstract.ts index 84b29b6..cc76ccb 100644 --- a/src/modules/event/event.abstract.ts +++ b/src/modules/event/event.abstract.ts @@ -1,6 +1,4 @@ import { Events } from 'discord.js'; -import { ACollectionEntry } from '../../helpers/abstract/collectionEntry.abstract'; -import { DiscordService } from '../discord/discord.service'; export abstract class AEvent { abstract readonly event: Events; diff --git a/src/modules/event/interfaces/iresponse.ts b/src/modules/event/interfaces/iresponse.ts index c1a58c5..61c9adb 100644 --- a/src/modules/event/interfaces/iresponse.ts +++ b/src/modules/event/interfaces/iresponse.ts @@ -1,4 +1,10 @@ export interface IResponse { matcher: RegExp; response: string | Object; + responseType?: ResponseType; +} + +export enum ResponseType { + Reply = 'reply', + Message = 'message', } diff --git a/src/modules/event/services/messageEvent.ts b/src/modules/event/services/messageEvent.ts index 8f012b0..7c9e01c 100644 --- a/src/modules/event/services/messageEvent.ts +++ b/src/modules/event/services/messageEvent.ts @@ -1,7 +1,7 @@ import { Injectable } from '@nestjs/common'; -import { Events, Message } from 'discord.js'; +import { Events } from 'discord.js'; import { AEvent } from '../event.abstract'; -import { IResponse } from '../interfaces/iresponse'; +import { IResponse, ResponseType } from '../interfaces/iresponse'; @Injectable() export class MessageEvent extends AEvent { event: Events = Events.MessageCreate; // ShardEvents.Message; @@ -11,34 +11,52 @@ export class MessageEvent extends AEvent { { matcher: /wag1/i, response: 'wagwan2', + responseType: ResponseType.Reply, }, { matcher: /^.{150,}$/m, response: 'halbe Bibel, ganzer huansohn ?XD', + responseType: ResponseType.Reply, }, { matcher: /https:\/\/.*/, response: 'send yo virus link to someone else no?xd', + responseType: ResponseType.Reply, }, { matcher: /wadim/i, response: '#goth', + responseType: ResponseType.Message, }, { matcher: /digga/i, response: 'digga mich nicht', + responseType: ResponseType.Reply, }, { matcher: /alina/i, response: 'Schuhgröße 36, weißer Nagellack 🥵', + responseType: ResponseType.Message, }, { matcher: /monke/i, response: '🐒 🦧', + responseType: ResponseType.Message, }, { matcher: /hego/i, response: { files: ['src/assets/textbox-donowall.gif'] }, + responseType: ResponseType.Reply, + }, + { + matcher: /bingus/i, + response: { files: ['src/assets/bingus.png'] }, + responseType: ResponseType.Message, + }, + { + matcher: /spoingus/i, + response: { files: ['src/assets/spoingus.png'] }, + responseType: ResponseType.Message, }, ]; @@ -50,8 +68,11 @@ export class MessageEvent extends AEvent { this.responseList.forEach((res) => { var testRes = res.matcher.test(content); if (testRes) { - message.reply(res.response); - // channel.send(res.response); + if (res?.responseType == ResponseType.Reply) { + message.reply(res.response); + } else { + channel.send(res.response); + } } }); });