Skip to content

Commit

Permalink
1.2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
ZyC0R3 committed Oct 1, 2021
1 parent cad1928 commit fd12e54
Show file tree
Hide file tree
Showing 15 changed files with 436 additions and 123 deletions.
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
## 1.2.6 Change Log
* RITA is now at 6400 servers, This is just Amazing.

### 1.2.6 Major Changes
* Sharding is now automatic, this should auto scale to the needed amount.
* A Major memory leak causing rita to restart every few hours has now been fixed.

### 1.2.6 Bug Fixes
* `!tr announce on/off` has been fixed.
* `!tr settings` has been unrestricted.
* `!tr blacklist {ServerID}` has been fixed.
* `!tr channel from {lang} to {lang}` no longer defaults to a DM task.

### 1.2.5 Command Changes
* `!tr react on/off` now turns on and off flag reactions.

### 1.2.6 Database Changes
* Added in 3 new columns ready for auto-warn and eject management
> Servers will be allowed 10 Permission Errors Before a Warning
> Server will be given a Maximum of 3 Warning before they are Ejected
> If your server should be Ejected a second time it will be blacklisted
### 1.2.6 Misc. Changes
* Sooooooo Many spelling mistakes corrected that it would be too many to list here.
* Help Menu updated with new commands.

## 1.2.5 Change Log
* Since the launch of 1.2.4 Rita has grown by 800 servers, This is Amazing. From all the RITA Dev Team, We cant thank you enough.

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ritabot",
"version": "1.2.5-15",
"version": "1.2.6",
"engines": {
"node": "16.2.0"
},
Expand Down
2 changes: 2 additions & 0 deletions src/commands/args.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const cmdMisc = require("./info_commands/misc");
const cmdPerms = require("./utility_commands/perm");
const cmdPrefix = require("./settings_commands/prefix");
const cmdSettings = require("./settings_commands/settings");
const cmdReact = require("./settings_commands/react");
const cmdStats = require("./info_commands/stats");
const cmdTranslateLast = require("./translation_commands/translate.last");
const cmdTranslateThis = require("./translation_commands/translate.this");
Expand Down Expand Up @@ -374,6 +375,7 @@ module.exports = function run (data)
"newbot": cmdJoin.newBot,
"prefix": cmdPrefix,
"proc": cmdMisc.proc,
"react": cmdReact,
"settings": cmdSettings,
"shards": cmdMisc.shards,
"stats": cmdStats,
Expand Down
115 changes: 66 additions & 49 deletions src/commands/info_commands/history.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,14 @@ function getHistory (data)
`# Version 1.2.5-5 - Release Date: 05/09/2021 \n` +
`# Version 1.2.5-6 - Release Date: 07/09/2021 \n` +
`# Version 1.2.5-7 - Release Date: 08/09/2021 \n` +
`# Version 1.2.5-8 - Release Date: 09/09/2021 \n` +
`# Version 1.2.5-9 - Release Date: 12/09/2021 \n` +
`# Version 1.2.5-10 - Release Date: 15/09/2021 \n` +
`# Version 1.2.5-11 - Was not published. \n` +
`# Version 1.2.5-12 - Release Date: 23/09/2021 \n` +
`# Version 1.2.5-13 - Was not published. \n` +
`# Version 1.2.5-14 - Release Date: 24/09/2021 \n` +
`# Version 1.2.5-15 - Was not published \n\n` +
"```\n";

// -------------
Expand All @@ -292,6 +300,28 @@ function getHistory (data)

};

const v126History = function v126History (data)
{

// -------------
// Command Code
// -------------

data.color = "info";
data.text = `**V1.2.6**\n` +
"```md\n" +
`# Version 1.2.6 - Release Date: 01/10/2021 \n` +
"```\n";

// -------------
// Send message
// -------------

return sendMessage(data);

};


const guilds = function guilds (data)
{

Expand All @@ -306,53 +336,38 @@ function getHistory (data)
`# Unified RITA Launched - 01/04/2021 \n` +
`# 100 Guilds - 25/04/2021 \n` +
`# Discord Verified - 27/05/2021 \n` +
`# 200 Guilds - 04/06/2021 \n` +
`# 300 Guilds - 08/06/2021 \n` +
`# 400 Guilds - 11/06/2021 \n` +
`# 500 Guilds - 14/06/2021 \n` +
`# 600 Guilds - 19/06/2021 \n` +
`# 700 Guilds - 21/06/2021 \n` +
`# 800 Guilds - 24/06/2021 \n` +
`# 900 Guilds - 27/06/2021 \n` +
`# 1000 Guilds - 29/06/2021 \n` +
`# 1100 Guilds - 01/07/2021 \n` +
`# 1200 Guilds - 04/07/2021 \n` +
`# 1300 Guilds - 07/07/2021 \n` +
`# 1400 Guilds - 09/07/2021 \n` +
`# 1500 Guilds - 11/07/2021 \n` +
`# 1600 Guilds - 14/07/2021 \n` +
`# 1700 Guilds - 17/07/2021 \n` +
`# 1800 Guilds - 19/07/2021 \n` +
`# 1900 Guilds - 21/07/2021 \n` +
`# 2000 Guilds - 24/07/2021 \n` +
`# 2100 Guilds - 26/07/2021 \n` +
`# 2200 Guilds - 28/07/2021 \n` +
`# 2300 Guilds - 30/07/2021 \n` +
`# 2400 Guilds - 02/08/2021 \n` +
`# 2500 Guilds - 03/08/2021 \n` +
`# 2600 Guilds - 05/08/2021 \n` +
`# 2700 Guilds - 08/08/2021 \n` +
`# 2800 Guilds - 09/08/2021 \n` +
`# 2900 Guilds - 11/08/2021 \n` +
`# 3000 Guilds - 13/08/2021 \n` +
`# 3100 Guilds - 15/08/2021 \n` +
`# 3200 Guilds - 17/08/2021 \n` +
`# 3300 Guilds - 18/08/2021 \n` +
`# 3400 Guilds - 19/08/2021 \n` +
`# 3500 Guilds - 22/08/2021 \n` +
`# 3600 Guilds - 23/08/2021 \n` +
`# 3700 Guilds - 25/08/2021 \n` +
`# 3800 Guilds - 26/08/2021 \n` +
`# 3900 Guilds - 27/08/2021 \n` +
`# 4000 Guilds - 28/08/2021 \n` +
`# 4100 Guilds - 30/08/2021 \n` +
`# 4200 Guilds - 31/08/2021 \n` +
`# 4300 Guilds - 01/09/2021 \n` +
`# 4400 Guilds - 03/09/2021 \n` +
`# 4500 Guilds - 05/09/2021 \n` +
`# 4600 Guilds - 06/09/2021 \n` +
`# 4700 Guilds - 07/09/2021 \n` +
`# 4800 Guilds - 09/09/2021 \n` +
`# 200 Guilds - 04/06/2021 / 300 Guilds - 08/06/2021\n` +
`# 400 Guilds - 11/06/2021 / 500 Guilds - 14/06/2021\n` +
`# 600 Guilds - 19/06/2021 / 700 Guilds - 21/06/2021\n` +
`# 800 Guilds - 24/06/2021 / 900 Guilds - 27/06/2021\n` +
`# 1000 Guilds - 29/06/2021 / 1100 Guilds - 01/07/2021\n` +
`# 1200 Guilds - 04/07/2021 / 1300 Guilds - 07/07/2021\n` +
`# 1400 Guilds - 09/07/2021 / 1500 Guilds - 11/07/2021\n` +
`# 1600 Guilds - 14/07/2021 / 1700 Guilds - 17/07/2021\n` +
`# 1800 Guilds - 19/07/2021 / 1900 Guilds - 21/07/2021\n` +
`# 2000 Guilds - 24/07/2021 / 2100 Guilds - 26/07/2021\n` +
`# 2200 Guilds - 28/07/2021 / 2300 Guilds - 30/07/2021\n` +
`# 2400 Guilds - 02/08/2021 / 2500 Guilds - 03/08/2021\n` +
`# 2600 Guilds - 05/08/2021 / 2700 Guilds - 08/08/2021 \n` +
`# 2800 Guilds - 09/08/2021 / 2900 Guilds - 11/08/2021 \n` +
`# 3000 Guilds - 13/08/2021 / 3100 Guilds - 15/08/2021 \n` +
`# 3200 Guilds - 17/08/2021 / 3300 Guilds - 18/08/2021 \n` +
`# 3400 Guilds - 19/08/2021 / 3500 Guilds - 22/08/2021 \n` +
`# 3600 Guilds - 23/08/2021 / 3700 Guilds - 25/08/2021 \n` +
`# 3800 Guilds - 26/08/2021 / 3900 Guilds - 27/08/2021 \n` +
`# 4000 Guilds - 28/08/2021 / 4100 Guilds - 30/08/2021 \n` +
`# 4200 Guilds - 31/08/2021 / 4300 Guilds - 01/09/2021 \n` +
`# 4400 Guilds - 03/09/2021 / 4500 Guilds - 05/09/2021 \n` +
`# 4600 Guilds - 06/09/2021 / 4700 Guilds - 07/09/2021 \n` +
`# 4800 Guilds - 09/09/2021 / 4900 Guilds - 10/09/2021 \n` +
`# 5000 Guilds - 11/09/2021 / 5100 Guilds - 13/09/2021 \n` +
`# 5200 Guilds - 14/09/2021 / 5300 Guilds - 15/09/2021 \n` +
`# 5400 Guilds - 16/09/2021 / 5500 Guilds - 18/09/2021 \n` +
`# 5600 Guilds - 19/09/2021 / 5700 Guilds - 21/09/2021 \n` +
`# 5800 Guilds - 22/09/2021 / 5900 Guilds - 23/09/2021 \n` +
`# 6000 Guilds - 25/09/2021 / 6100 Guilds - 26/09/2021 \n` +
`# 6200 Guilds - 27/09/2021 / 6300 Guilds - 29/09/2021 \n` +
`# 6400 Guilds - 30/09/2021 / \n` +
"```\n";

// -------------
Expand All @@ -376,6 +391,7 @@ function getHistory (data)
"1.2.3": v123History,
"1.2.4": v124History,
"1.2.5": v125History,
"1.2.6": v126History,
"guild": guilds
};

Expand All @@ -396,7 +412,7 @@ function getHistory (data)

data.color = "error";
data.text =
`:warning: **\`${data.cmd.params}\`** is not a valid history option. \nPlease use 1.0 / 1.1 / 1.2.0 / 1.2.1 / 1.2.2 / 1.2.3 / 1.2.4`;
`:warning: **\`${data.cmd.params}\`** is not a valid history option. \nPlease use 1.0 / 1.1 / 1.2.0 / 1.2.1 / 1.2.2 / 1.2.3 / 1.2.4 / 1.2.5 / 1.2.6`;

// -------------
// Send message
Expand Down Expand Up @@ -443,7 +459,8 @@ module.exports = function run (data)
`# Version 1.2.2 - Release Date: 25/04/2021 \n` +
`# Version 1.2.3 - Release Date: 24/05/2021 \n` +
`# Version 1.2.4 - Release Date: 09/06/2021 \n` +
`# Version 1.2.5 - Release Date: 09/06/2021 \n` +
`# Version 1.2.5 - Release Date: 05/07/2021 \n` +
`# Version 1.2.6 - Release Date: 01/10/2021 \n` +
`* There are ?? iterations of this Version\n\n` +
"```\n";

Expand Down
3 changes: 2 additions & 1 deletion src/commands/settings_commands/embed.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ function embed (data)
}
const output =
"**```Embedded Translation```**\n" +
`Embedded Message translation is now turned : ${commandVariable1}\n\n`;
`Embedded Message translation is now turned : \`${commandVariable1}\`\n\n` +
`\n`;
data.color = "info";
data.text = output;

Expand Down
139 changes: 139 additions & 0 deletions src/commands/settings_commands/react.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
// -----------------
// Global variables
// -----------------

// Codebeat:disable[LOC,ABC,BLOCK_NESTING,ARITY]
const logger = require("../../core/logger");
const db = require("../../core/db");
const sendMessage = require("../../core/command.send");

// ------------------------------
// React varible command handler
// ------------------------------

function react (data)
{

const commandVariable = data.cmd.params.split(" ")[0].toLowerCase();

if (commandVariable === "on" || commandVariable === "off")
{

let value = false;
if (commandVariable === "on")
{

value = true;

}

// console.log(`DEBUG: React variable ${commandVariable}`);
return db.updateServerTable(data.message.guild.id, "react", value, function error (err)
{

if (err)
{

return logger(
"error",
err,
"command",
data.message.channel.guild.name
);

}
const output =
"**```Flag Reactions```**\n" +
`Translations by Flag Reactions is now turned : \`${commandVariable}\`\n\n` +
`\n`;
data.color = "info";
data.text = output;

// -------------
// Send message
// -------------

return sendMessage(data);

});

}

data.color = "error";
data.text =
`:warning: **\`${commandVariable
}\`** is not a valid react option.\n`;

// -------------
// Send message
// -------------

return sendMessage(data);

}

// -------------
// Command Code
// -------------

module.exports = function run (data)

{

// -------------------------------
// Command allowed by admins only
// -------------------------------

Override: if (!process.env.DISCORD_BOT_OWNER_ID.includes(data.message.author.id))
{

if (data.message.isAdmin === false)
{

{

data.color = "warn";

}
data.text = ":cop: This command is reserved for server adminis.";

// -------------
// Send message
// -------------

return sendMessage(data);

}
break Override;

}

// --------------------------------
// Error if react param is missing
// --------------------------------

if (!data.cmd.params)
{

data.color = "error";
data.text =
":warning: Missing `react` parameter. Use `" +
`${data.config.translateCmdShort} help react\` to learn more.`;

// -------------
// Send message
// -------------

return sendMessage(data);

}

// ----------------
// Execute setting
// ----------------

return react(data);

};


3 changes: 2 additions & 1 deletion src/commands/settings_commands/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,9 +425,10 @@ module.exports = function run (data)
data.text =
`**\`\`\`${data.message.channel.guild.name} - Server Settings` +
`\`\`\`**\n:information_source: Your current prefix is: **\`${db.server_obj[data.message.guild.id].db.prefix}\`**\n\n` +
`:tada: Annocement Messages: **\`${data.cmd.server[0].announce}\`**\n\n` +
`:tada: Allow Annocement Messages: **\`${data.cmd.server[0].announce}\`**\n\n` +
`:inbox_tray: Embedded Message Style: **\`${data.cmd.server[0].embedstyle}\`**\n\n` +
`:robot: Bot to Bot Translation Status: **\`${data.cmd.server[0].bot2botstyle}\`**\n\n` +
`:flags: Translation by Flag Reactions: **\`${data.cmd.server[0].react}\`**\n\n` +
`:pause_button: Help Menu Persistance: **\`${data.cmd.server[0].persist}\`**\n\n` +
`:wrench: Webhook Debug Active State: **\`${data.cmd.server[0].webhookactive}\`**`;

Expand Down
Loading

0 comments on commit fd12e54

Please sign in to comment.