Skip to content

Commit

Permalink
Merge pull request #35 from Blvckleg/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
sanriodev authored Feb 15, 2024
2 parents 868639f + 0823057 commit 60c3947
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 10 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -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
Empty file added CHANGELOG.md
Empty file.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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)
Binary file added src/assets/bingus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/spoingus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions src/modules/event/event.abstract.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
6 changes: 6 additions & 0 deletions src/modules/event/interfaces/iresponse.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
export interface IResponse {
matcher: RegExp;
response: string | Object;
responseType?: ResponseType;
}

export enum ResponseType {
Reply = 'reply',
Message = 'message',
}
29 changes: 25 additions & 4 deletions src/modules/event/services/messageEvent.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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,
},
];

Expand All @@ -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);
}
}
});
});
Expand Down

0 comments on commit 60c3947

Please sign in to comment.