Skip to content
Open

q #2

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
450ab76
Merge pull request #15 from SkillBeatsAll/master
SkillBeatsAll Feb 1, 2021
06ec309
fix: challenges bug
Miqhtiedev Feb 1, 2021
b90a8a3
challenges changes
Miqhtiedev Feb 1, 2021
4a2eb25
update challenges.json
Miqhtiedev Feb 1, 2021
bce1629
fix mention exploit
SkillBeatsAll Feb 2, 2021
72aee6e
feat: logger & fix bugs with c!staff
Miqhtiedev Feb 3, 2021
d7cb62a
better rejections
Miqhtiedev Feb 3, 2021
fb138b6
Merge pull request #16 from Miqhtiedev/v3
SkillBeatsAll Feb 4, 2021
097c549
Lol
Miqhtiedev Feb 5, 2021
270eb8b
deletes command issuer's message
SkillBeatsAll Feb 7, 2021
69a9afc
Revert "deletes command issuer's message"
Miqhtiedev Feb 7, 2021
0b089b0
verbal changes
Miqhtiedev Feb 8, 2021
bf3c7a5
Merge pull request #17 from CalmGuild/verbal-changes
Miqhtiedev Feb 8, 2021
decd05d
better permission checking
Miqhtiedev Feb 9, 2021
932f348
Remove debug thing
Miqhtiedev Feb 9, 2021
0a63e48
Merge pull request #18 from CalmGuild/permission-changes
SkillBeatsAll Feb 9, 2021
1cc4982
global settings
Miqhtiedev Feb 10, 2021
e1a2a07
add maintenance
Miqhtiedev Feb 11, 2021
39c59e8
update ver
Miqhtiedev Feb 11, 2021
0749b90
Merge pull request #19 from CalmGuild/sleep-changes
SkillBeatsAll Feb 12, 2021
8515f15
feat: format command
Miqhtiedev Mar 31, 2021
51196dc
fix: format only including 2nd index none after
Miqhtiedev Mar 31, 2021
3d3f5b0
april challenges
Miqhtiedev Mar 31, 2021
dd1d738
Update 8ball.ts
Apr 1, 2021
a7fd508
minor changes to questions
Miqhtiedev Apr 1, 2021
1851d36
Merge pull request #21 from notbushman/patch-4
Miqhtiedev Apr 2, 2021
a8d083a
total rewrite of command handler and all commands (holy shit)
Miqhtiedev Apr 6, 2021
f591e6c
subcommand settings not working with compiled js files
Miqhtiedev Apr 10, 2021
c094828
remove count-to code (channel nonexistent)
SkillBeatsAll Apr 10, 2021
b7710d5
fix unused error
Miqhtiedev Apr 10, 2021
631bc4e
create reaction listener
Miqhtiedev Apr 10, 2021
3046fd2
feat: tickets
Miqhtiedev Apr 28, 2021
3ab4acc
Merge pull request #22 from Miqhtiedev/tickets
Miqhtiedev Apr 29, 2021
afa2783
Update README.md
Miqhtiedev Apr 29, 2021
7c5ca28
better issue template
Miqhtiedev Apr 30, 2021
91dc0bb
Delete config.yml
Miqhtiedev Apr 30, 2021
9e5dec6
add issue config.yml
Miqhtiedev Apr 30, 2021
c2a73a8
Update config.yml
Miqhtiedev Apr 30, 2021
b937354
fix conflicts
Miqhtiedev May 8, 2021
a3229c1
remove legacy format.ts
Miqhtiedev May 8, 2021
2c5fbad
remove versioning
Miqhtiedev May 8, 2021
7d91def
have disabling commands actually work
Miqhtiedev May 8, 2021
9225f3f
have sleep mode actually work
Miqhtiedev May 8, 2021
e414bd6
remove maintenance. (useless)
Miqhtiedev May 8, 2021
ca0bad5
add better command feedback
Miqhtiedev May 8, 2021
fffdd76
add prompt listener
Miqhtiedev May 8, 2021
b7ba85e
add tags to database
Miqhtiedev May 8, 2021
9154e1d
feat: tags
Miqhtiedev May 8, 2021
08294ab
delete info
Miqhtiedev May 8, 2021
a717ccc
no more crashes
Miqhtiedev May 8, 2021
5da391a
v3
Miqhtiedev May 8, 2021
28c577c
fix enum thigny
Miqhtiedev May 8, 2021
8e7c36e
c!ticket open --> c!open
Miqhtiedev May 8, 2021
0734dc5
Merge branch 'v3'
Miqhtiedev May 8, 2021
b9cadc5
fix getRole function not working
Miqhtiedev May 8, 2021
416e15b
im dumb
Miqhtiedev May 8, 2021
6468b1e
have tickets stop flooding audit log
Miqhtiedev May 12, 2021
af78703
im smart
Miqhtiedev May 13, 2021
82fd036
make how to close ticket more clear
Miqhtiedev May 13, 2021
4d729e3
update usage for open cmd
Miqhtiedev May 13, 2021
bd1c157
have format command work on users not in guild
Miqhtiedev May 13, 2021
703fd3d
make images optional format command
Miqhtiedev May 13, 2021
2121d54
fix: add viewchannel flag for supported ticket roles
Miqhtiedev May 15, 2021
bd37bdc
ok
Miqhtiedev May 15, 2021
d86e16a
add timestamps to verbals
Miqhtiedev May 16, 2021
ecc122b
fixes #25
Miqhtiedev May 18, 2021
9cd61fa
add modlogs to channels.json
Miqhtiedev May 22, 2021
187fe17
show verbals in modlogs
Miqhtiedev May 22, 2021
2e0bcb6
Bump ws from 7.4.2 to 7.4.6
dependabot[bot] Jun 1, 2021
bdb74b2
chore: script to link guild member discordids to mcuuids
ryanArora Jun 1, 2021
26f93fc
fix: bug
ryanArora Jun 1, 2021
055e90b
fix: bug 2
ryanArora Jun 1, 2021
6e4b776
fix: bug 3
ryanArora Jun 1, 2021
e48d82b
fix: bug 4
ryanArora Jun 1, 2021
cb79355
fix: bug 5
ryanArora Jun 1, 2021
db3dcf0
Merge pull request #26 from CalmGuild/dependabot/npm_and_yarn/ws-7.4.6
Miqhtiedev Jun 2, 2021
6d2a7d5
database: add user documents
Miqhtiedev Jun 5, 2021
10d98e3
Merge branch 'master' of https://github.com/Miqhtiedev/CalmBot
Miqhtiedev Jun 5, 2021
fcbb06c
use async/await for mojang api
Miqhtiedev Jun 5, 2021
9dadfc5
chore: script to link guild member discordids to mcuuids
Miqhtiedev Jun 5, 2021
d544b2f
Merge branch 'master' of https://github.com/calmguild/calmbot
Miqhtiedev Jun 5, 2021
2dc0f5e
Merge pull request #29 from Miqhtiedev/master
Miqhtiedev Jun 5, 2021
234687d
user data command
Miqhtiedev Jun 5, 2021
e103237
Merge branch 'master' of https://github.com/calmguild/calmbot
Miqhtiedev Jun 5, 2021
44ac799
add bot role to tickets. resolves #28
Miqhtiedev Jun 5, 2021
0e4fb6b
revert user changes. no longer needed (pain)
Miqhtiedev Jun 12, 2021
021a738
have bot set status in ready event
Miqhtiedev Jul 5, 2021
e5f4e71
at someone command
Miqhtiedev Jul 9, 2021
c43f149
trim commandName in command handler
Miqhtiedev Aug 3, 2021
713df5b
Update README.md
Miqhtiedev Aug 18, 2021
e519179
archive
Miqhtiedev Dec 4, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions .github/ISSUE_TEMPLATE/bug-report.md

This file was deleted.

42 changes: 42 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Bug report
description: File a bug report for us to fix
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report. Please be a descriptive as possible so we can improve.

- type: textarea
attributes:
label: Describe the bug
description: A clear description of what the bug is.
validations:
required: true

- type: textarea
attributes:
label: To Reproduce
description: Steps to reproduce this behaviour
placeholder: |
1. Do that
2. Then this
3. Error there
validations:
required: true

- type: textarea
attributes:
label: Expected behaviour
description: Describe what should be happening.
validations:
required: true

- type: textarea
attributes:
label: Screenshots / Videos
description: If applicable, add screenshots to help explain your problem.

- type: textarea
attributes:
label: Additional Context
description: Add any other context about the problem here
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Discord
url: https://discord.gg/calm
about: Join our discord.
9 changes: 0 additions & 9 deletions .github/ISSUE_TEMPLATE/feature-request.md

This file was deleted.

29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Feature request
description: Suggest an idea for this project
labels: "Feature Request"
body:
- type: markdown
attributes:
value: |
Thanks for taking this time to fill out a feature request. Please be as descriptive or as non descriptive as possible.

- type: textarea
attributes:
label: What feature do you want to see added?
description: What would you like to add?
validations:
required: true

- type: textarea
attributes:
label: Why would this improve Calmbot?
description: What about this feature would improve the bot overall?
validations:
required: true

- type: textarea
attributes:
label: Implementation method (optional)
description: How would someone go about implementing this?


4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.env
node_modules
build
build
logs
settings.json
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

# CalmBot

## The project is now *archived* and will no longer recieve support or updates. Please visit [the rewritten calmbot](https://github.com/calmguild/calmbot)


> CalmBot is an open-source Discord bot, built with discord.js
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@
"start:dev": "ts-node src/bot.ts"
},
"dependencies": {
"@types/fs-extra": "^9.0.6",
"axios": "^0.21.1",
"discord.js": "^12.5.1",
"dotenv": "^8.2.0",
"mongoose": "^5.11.6"
"fs-extra": "^9.1.0",
"mongoose": "^5.11.6",
"winston": "^3.3.3"
},
"devDependencies": {
"rimraf": "^3.0.2",
Expand Down
2 changes: 2 additions & 0 deletions scripts/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# temp files
members.json
98 changes: 98 additions & 0 deletions scripts/getMembersFromDiscord.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
require("dotenv").config();

const { Client, Intents } = require("discord.js");
const axios = require("axios");
const fs = require("fs-extra");
const path = require("path");
const roles = require("../src/data/calm/roles.json");

const args = process.argv.slice(2);
const calmiesRole = roles.GENERAL.CALMIES;
const guildId = "5af718d40cf2cbe7a9eeb063";

const intents = new Intents([Intents.NON_PRIVILEGED, "GUILD_MEMBERS"]);
const bot = new Client({ ws: { intents } });

async function run() {
console.log("Bot ready!");

if (!args[0]) {
console.error("Provide a discord guild as the first argument");
return;
}
const res = await axios.get(`https://api.hypixel.net/guild?key=${process.env.HYPIXEL_API_KEY}&id=${guildId}`);
const guild = res?.data?.guild;
if (!guild) {
console.log("Invalid guild id!");
bot.destroy();
return;
}

console.log("Successfuly requested guild");

const members = [];
for (const [i, member] of Object.entries(guild.members)) {
const uuid = member.uuid;

const res = await axios.get(`https://api.mojang.com/user/profiles/${uuid}/names`);
const names = res?.data;
if (!names) {
console.log("Failed to request name of " + uuid);
members.push({ uuid, ign: "", id: "", nick: "", tag: "" });
return;
}
const ign = names[names.length - 1].name;

members.push({ uuid, ign, id: "", nick: "", tag: "" });
console.log(`${uuid}:${ign}`);
}

const discordGuild = bot.guilds.cache.get(args[0]);
if (!discordGuild) {
console.error("The bot isn't in the guild " + args[0]);
return;
}

const discordMembers = await discordGuild.members.fetch();
for (const [id, member] of discordMembers) {
if (!member.roles.cache.some((r) => r.id === calmiesRole.id)) continue;

let name = member.nickname;
if (!name) {
console.log("Couldn't find ign for " + member.user.tag);
continue;
}

name = name.slice(name.indexOf("]") + 2);
const j = name.indexOf(" ");
if (j !== -1) name = name.slice(0, j);

if (!name) {
console.log("Couldn't find ign for " + member.nickname);
continue;
}
const i = members.findIndex((m) => m.ign.toLowerCase() === name.toLowerCase());
if (i === -1) {
console.log(`${member.nickname} isn't in the guild`);
continue;
}

members[i].id = member.user.id;
members[i].nick = member.nickname;
members[i].tag = member.user.tag;
}

bot.destroy();

for (const member of members) {
if (!member.id) {
console.log(`NOT_IN_DISCORD:${member.ign}`);
}
}

console.log("WRITING", members);
fs.writeFileSync(path.join(__dirname, "members.json"), JSON.stringify(members, null, "\t"));
}

bot.on("ready", run);
bot.login(process.env.BOT_TOKEN);
2 changes: 1 addition & 1 deletion src/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Client from "./structures/Client";

const bot = new Client();

bot.loadCommands(path.join(__dirname, "commands"));
bot.registerCommands(path.join(__dirname, "commands"), true);
bot.loadEvents(path.join(__dirname, "events"));

bot.login(process.env.BOT_TOKEN);
40 changes: 0 additions & 40 deletions src/commands/8ball.ts

This file was deleted.

69 changes: 0 additions & 69 deletions src/commands/admin.ts

This file was deleted.

Loading