Skip to content

Commit

Permalink
Update V2.0.3
Browse files Browse the repository at this point in the history
🐛 Fixed a bug where no Notification is being sent after a user answers a ticket
🐛 Fixed a bug where /ticketteam would not send an error if a user has insufficient permissions
🐛 Fixed a bug where sending /ticketteam without an action would throw no error for authorized users
🐛 Fixed embed colour for error message if an user with insufficient permissions tries to use /ticketteam

⬆️ Upgraded dependencies to newest version

🔥 Removed legacy check for me to be able to use /ticketteam without having the team-role

🌐 Fixed a typo for English language pack

💄 Log output regarding version checks are now colourized. If no update is available the output will be coloured green. If there is an update available or an error occurred while checking for a new version the output will be red

📝 Added Changelog

Fixes #4
  • Loading branch information
AstroGD committed Sep 30, 2020
1 parent 73169e9 commit 74abd49
Show file tree
Hide file tree
Showing 8 changed files with 157 additions and 50 deletions.
4 changes: 4 additions & 0 deletions .snyk
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
version: v1.14.1
ignore: {}
patch: {}
23 changes: 23 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Version 2.0.3
#### Released 01.10.2020 (DMY)

## Bugfixes
- :bug: Fixed a bug where no Notification is being sent after a user answers a ticket
- :bug: Fixed a bug where /ticketteam would not send an error if a user has insufficient permissions
- :bug: Fixed a bug where sending /ticketteam without an action would throw no error for authorized users
- :bug: Fixed embed colour for error message if an user with insufficient permissions tries to use /ticketteam

## Dependency updates
- :arrow_up: Upgraded dependencies to newest version

## Removed Features
- :fire: Removed legacy check for me to be able to use /ticketteam without having the team-role

## Language
- :globe_with_meridians: Fixed a typo for English language pack

## UI and Style
- :lipstick: Log output regarding version checks are now colourized. If no update is available the output will be coloured green. If there is an update available or an error occurred while checking for a new version the output will be red.

## Documentation
- :memo: Added Changelog
2 changes: 1 addition & 1 deletion commands/ticket.js
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ module.exports = function (log, makeEmbed, language, config, languageconfig, cli
.catch(e => {
log(`An error occurred while sending a messagee to ${message.author.tag}: ${e.stack}`, 2);
});
var teamchannel = client.guilds.cache.cache.get(config.server_id).channels.cache.get(config.ticket_notification_channel_id);
var teamchannel = client.guilds.cache.get(config.server_id).channels.cache.get(config.ticket_notification_channel_id);
if (!teamchannel) {
return;
}
Expand Down
154 changes: 117 additions & 37 deletions commands/ticketteam.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lang/en_EN.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"your_tickets_been_closed_please_contact_the_team_if_this_is_a_mistake": "Your Ticket's been closed. Please contact the team if this is a mistake.",
"this_ticket_was_not_created_by_you": "This ticket was not created by you",
"information_about_the_selected_ticket": "Information about the selected ticket",
"displays_the_last_10_messages_and_the_original_request": "Shows the last messages and the original request",
"displays_the_last_10_messages_and_the_original_request": "Shows the last 10 messages and the original request",
"at": "at",
"please_enter_a_message": "Please enter a message",
"an_error_occurred": "An error occurred",
Expand Down
10 changes: 5 additions & 5 deletions main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Ticketsystem by AstroGD
* @author AstroGD (https://www.astrogd.eu)
* @version 2.0.1
* @version 2.0.3
* @since 15. Mai 2018
* @link https://www.astrogd.eu
* @license AGPL-3.0
Expand Down Expand Up @@ -72,20 +72,20 @@ async function checkVersion() {
'maxRedirects': 20
});
} catch (error) {
return log(`Version couldn't be checked! Make sure to allow network access to software.astrogd.eu`, 1);
return log(`\x1b[31mVersion couldn't be checked! Make sure to allow network access to software.astrogd.eu\x1b[0m`, 1);
}

if (!versionInfo) return log(`Version couldn't be checked! Make sure to allow network access to software.astrogd.eu`, 1);
if (!versionInfo) return log(`\x1b[31mVersion couldn't be checked! Make sure to allow network access to software.astrogd.eu\x1b[0m`, 1);
versionInfo = JSON.parse(versionInfo.toString());

const version = pk.version.split(".");
const latest = versionInfo.version.split(".");

if (version[0] < latest[0] || version[0] == latest[0] && version[1] < latest[1] || version[0] == latest[0] && version[1] == latest[1] && version[2] < latest[2]) {
return log(`A new version of the ticketsystem is available (${pk.version} --> ${versionInfo.version}). Make sure to visit ${versionInfo.url} and download the newest version. If you need help look in the repositorys wiki under "how to update" or contact AstroGD (https://www.astrogd.eu/en/kontakt)`, 2);
return log(`\x1b[31mA new version of the ticketsystem is available (${pk.version} --> ${versionInfo.version}). Make sure to visit ${versionInfo.url} and download the newest version. If you need help look in the repositorys wiki under "how to update" or contact AstroGD (https://www.astrogd.eu/en/kontakt)\x1b[0m`, 2);
}

log(`Newest version installed!`, 3);
log(`\x1b[32mNewest version installed!\x1b[0m`, 3);
};

//Additional Code
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ticketsystem",
"version": "2.0.2",
"version": "2.0.3",
"description": "Ticketsystem Discord Bot",
"main": "main.js",
"scripts": {
Expand All @@ -14,4 +14,4 @@
"follow-redirects": "^1.13.0",
"fs-extra": "^9.0.1"
}
}
}

0 comments on commit 74abd49

Please sign in to comment.