Compare commits

..

No commits in common. "02eff61a508238bee451d59c5ecff7c2465badb3" and "995564cb5bcab0bfaa181b62b2b7e6059528742a" have entirely different histories.

15 changed files with 211 additions and 2197 deletions

View file

@ -7,8 +7,9 @@
# any secret values. # any secret values.
BOT_TOKEN= BOT_TOKEN=
BOT_VER=3.1.1 BOT_VER=3.1
BOT_AUTHOR=Vylpes BOT_AUTHOR=Vylpes
BOT_DATE=08 May 2023
BOT_OWNERID=147392775707426816 BOT_OWNERID=147392775707426816
BOT_CLIENTID=682942374040961060 BOT_CLIENTID=682942374040961060

38
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View file

@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
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. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.

16
.github/ISSUE_TEMPLATE/epic.md vendored Normal file
View file

@ -0,0 +1,16 @@
---
name: Epic
about: Agile Epic
title: ''
labels: epic
assignees: ''
---
*Description here*
## Stories
*Stories linked to this epic*
## Bugs
*Bugs linked to this epic*

View file

@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
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.

24
.github/ISSUE_TEMPLATE/user-story.md vendored Normal file
View file

@ -0,0 +1,24 @@
---
name: User Story
about: Agile User Story
title: ''
labels: needs criteria, story
assignees: ''
---
Epic Link: N/A
Story Points: N/A
---
*Description here*
## Acceptance Criteria
*Add your ACs here*
## Notes
*Any extra information*
## Subtasks
*Add technical subtasks here*

30
.github/pull_request_template.md vendored Normal file
View file

@ -0,0 +1,30 @@
# Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
## Type of change
Please delete options that are not relevant.
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
# How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
# Checklist:
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules

0
.gitlab/.gitkeep Normal file
View file

View file

View file

@ -0,0 +1,29 @@
# Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
## Type of change
Please delete options that are not relevant.
- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- Breaking change (fix or feature that would cause existing functionality to not work as expected)
- This change requires a documentation update
# How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
# Checklist
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependant changes have been merged and published in downstream modules

View file

@ -7,7 +7,7 @@
# any secret values. # any secret values.
BOT_TOKEN= BOT_TOKEN=
BOT_VER=3.1.1 BOT_VER=3.1
BOT_AUTHOR=Vylpes BOT_AUTHOR=Vylpes
BOT_OWNERID=147392775707426816 BOT_OWNERID=147392775707426816
BOT_CLIENTID=680083120896081954 BOT_CLIENTID=680083120896081954

View file

@ -7,7 +7,7 @@
# any secret values. # any secret values.
BOT_TOKEN= BOT_TOKEN=
BOT_VER=3.1.1 BOT_VER=3.1
BOT_AUTHOR=Vylpes BOT_AUTHOR=Vylpes
BOT_OWNERID=147392775707426816 BOT_OWNERID=147392775707426816
BOT_CLIENTID=1016767908740857949 BOT_CLIENTID=1016767908740857949

View file

@ -1,6 +1,6 @@
{ {
"name": "vylbot-app", "name": "vylbot-app",
"version": "3.1.1", "version": "3.1.0",
"description": "A discord bot made for Vylpes' Den", "description": "A discord bot made for Vylpes' Den",
"main": "./dist/vylbot", "main": "./dist/vylbot",
"typings": "./dist", "typings": "./dist",
@ -10,8 +10,7 @@
"start": "node ./dist/vylbot", "start": "node ./dist/vylbot",
"test": "jest", "test": "jest",
"db:up": "typeorm migration:run -d dist/database/dataSources/appDataSource.js", "db:up": "typeorm migration:run -d dist/database/dataSources/appDataSource.js",
"db:down": "typeorm migration:revert -d dist/database/dataSources/appDataSource.js", "db:down": "typeorm migration:revert -d dist/database/dataSources/appDataSource.js"
"release": "np --no-publish"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
@ -40,12 +39,8 @@
"ts-jest": "^29.0.0", "ts-jest": "^29.0.0",
"typeorm": "0.3.17" "typeorm": "0.3.17"
}, },
"resolutions": {
"**/semver": "^7.5.2"
},
"devDependencies": { "devDependencies": {
"@types/node": "^20.0.0", "@types/node": "^20.0.0",
"np": "^8.0.4",
"typescript": "^5.0.0" "typescript": "^5.0.0"
} }
} }

View file

@ -1,91 +0,0 @@
import { CommandInteraction, SlashCommandBuilder } from "discord.js";
import { Command } from "../type/command";
import { EmbedBuilder } from "@discordjs/builders";
import EmbedColours from "../constants/EmbedColours";
export default class Poll extends Command {
constructor() {
super();
super.CommandBuilder = new SlashCommandBuilder()
.setName('poll')
.setDescription('Run a poll, automatically adding reaction emojis as options')
.addStringOption(option =>
option
.setName('title')
.setDescription('Title of the poll')
.setRequired(true))
.addStringOption(option =>
option
.setName('option1')
.setDescription('Option 1')
.setRequired(true))
.addStringOption(option =>
option
.setName('option2')
.setDescription('Option 2')
.setRequired(true))
.addStringOption(option =>
option
.setName('option3')
.setDescription('Option 3'))
.addStringOption(option =>
option
.setName('option4')
.setDescription('Option 4'))
.addStringOption(option =>
option
.setName('option5')
.setDescription('Option 5'));
}
public override async execute(interaction: CommandInteraction) {
const title = interaction.options.get('title');
const option1 = interaction.options.get('option1');
const option2 = interaction.options.get('option2');
const option3 = interaction.options.get('option3');
const option4 = interaction.options.get('option4');
const option5 = interaction.options.get('option5');
if (!title || !option1 || !option2) return;
const description = [
option1.value as string,
option2.value as string,
option3?.value as string,
option4?.value as string,
option5?.value as string
]
.filter(x => x != null);
const arrayOfNumbers = [
':one:',
':two:',
':three:',
':four:',
':five:',
];
const reactionEmojis = ["1⃣", "2⃣", "3⃣", "4⃣", "5⃣", "6⃣", "7⃣", "8⃣", "9⃣"];
description.forEach((value, index) => {
description[index] = `${reactionEmojis[index]} ${description[index]}`;
});
const embed = new EmbedBuilder()
.setColor(EmbedColours.Ok)
.setTitle(title.value as string)
.setDescription(description.join('\n'))
.setFooter({
text: `Poll by ${interaction.user.username}`,
iconURL: interaction.user.avatarURL()!,
});
const message = await interaction.reply({ embeds: [ embed ]});
description.forEach(async (value, index) => {
await (await message.fetch()).react(reactionEmojis[index]);
});
}
}

View file

@ -13,7 +13,6 @@ import Disable from "./commands/disable";
import Ignore from "./commands/ignore"; import Ignore from "./commands/ignore";
import Kick from "./commands/kick"; import Kick from "./commands/kick";
import Mute from "./commands/mute"; import Mute from "./commands/mute";
import Poll from "./commands/poll";
import Role from "./commands/Role/role"; import Role from "./commands/Role/role";
import ConfigRole from "./commands/Role/config"; import ConfigRole from "./commands/Role/config";
import Rules from "./commands/rules"; import Rules from "./commands/rules";
@ -50,7 +49,6 @@ export default class Registry {
CoreClient.RegisterCommand("ignore", new Ignore()); CoreClient.RegisterCommand("ignore", new Ignore());
CoreClient.RegisterCommand("kick", new Kick()); CoreClient.RegisterCommand("kick", new Kick());
CoreClient.RegisterCommand("mute", new Mute()); CoreClient.RegisterCommand("mute", new Mute());
CoreClient.RegisterCommand("poll", new Poll());
CoreClient.RegisterCommand("rules", new Rules()); CoreClient.RegisterCommand("rules", new Rules());
CoreClient.RegisterCommand("setup", new Setup()); CoreClient.RegisterCommand("setup", new Setup());
CoreClient.RegisterCommand("timeout", new Timeout()); CoreClient.RegisterCommand("timeout", new Timeout());

2142
yarn.lock

File diff suppressed because it is too large Load diff