You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<pstyle="text-align: center;">A discord bot for an smp minecraft server, with multilingual functions.</p>
133
+
<pstyle="text-align: center;">This bot offers commands for managing a Discord guild for a Minecraft server, user and administrator tasks, as well as language customization.</p>
<p>This bot offers commands for managing a Discord guild for a Minecraft server, user and administrative tasks, as well as language customization. Below are all the available commands and their descriptions.</p>
100
+
101
+
<h2>User Commands</h2>
102
+
<h3>/status</h3>
103
+
<p>Displays the current status of the Minecraft server, including whether it is online or offline and the list of online players.</p>
104
+
<h3>/report</h3>
105
+
<p>Displays a summary of the status of tasks for all users, showing who has or has not completed the tasks.</p>
106
+
<h3>/setlanguage</h3>
107
+
<p>Allows the user to set the language that the bot should use with them.</p>
108
+
109
+
<h2>Server Commands</h2>
110
+
<h3>/announce</h3>
111
+
<p>Sends an announcement to the server, with support for images/videos and embed format.</p>
112
+
113
+
<h2>Administrator Commands</h2>
114
+
<h3>/marktask</h3>
115
+
<p>Marks the status of a task as completed or not completed for the user.</p>
116
+
<h3>/admintask</h3>
117
+
<p>Allows marking the status of tasks for a specific user.</p>
118
+
<h3>/userinfo</h3>
119
+
<p>Displays detailed information about a user, including nickname, date of joining the server, and messages sent.</p>
120
+
<h3>/adminreport</h3>
121
+
<p>Displays a status report on all users' tasks for administrators.</p>
122
+
123
+
<h2>Multilingual Support</h2>
124
+
<p>This bot offers multilingual support, allowing users to choose the language in which they interact with the bot.</p>
125
+
<h3>How to change the language</h3>
126
+
<p>The user can change the language using the /setlanguage command. Once set, the bot will use the chosen language for all future interactions.</p>
127
+
128
+
<h3>Languages Supported</h3>
129
+
<ul>
130
+
<li><strong>English</strong> (`en`)</li>
131
+
<li><strong>Portuguese</strong> (`pt`)</li>
132
+
<li><strong>Spanish</strong> (`es`)</li>
133
+
<li><strong>French</strong> (`fr`)</li>
134
+
</ul>
135
+
136
+
<p>If the user is already using the desired language, the bot will notify them that no change was made.</p>
137
+
138
+
<h3>Functionality</h3>
139
+
<p>After setting the language, all the bot's messages and responses will be adjusted accordingly. This includes error messages, confirmations, and interaction commands such as /status, /report, and other administrator commands.</p>
140
+
141
+
<h3>How the translation works</h3>
142
+
<p>Translations are managed using JSON files for each language (e.g., en.json, pt.json, fr.json). Each key corresponds to a message that the bot can send. The translation system is dynamic and can be easily expanded to support new languages.</p>
143
+
<p>If you would like to contribute improvements to the translations or add a new language, feel free to submit a pull request!</p>
<h1id="What is Sussurros SMP?">What is Sussurros SMP?</h1>
99
+
<p><strong>Sussurros SMP</strong> is a Minecraft multiplayer server, with the intention of generating and promoting interaction between a closed group of people.<br>
100
+
The word <code>Sussurros</code> means whispers in Portuguese, the main language of the project.<br>
101
+
The server has a main focus on roleplay, and tells a story through the <i>main lore</i> while allowing players to develop their own individual lores.</p>
102
+
<h1id="What is this doing here?">What is this doing here?</h1>
103
+
<p>The project is closed to a few people - mostly within a group of friends - but is maintained by a small staff team. I am the main developer of the server, responsible for organizing the server hosting and maintaining a repository of scripts, which use the <atarget="_blank" href="https://kubejs.com/">kubejs</a> mod, that bring life to the roleplays that happen on the server and help with some more specific things.</p>
104
+
<p>At the moment the repository is not a big deal, it is formed mostly by really <i>simple code</i>, but it is in my plans to dare to create more ingenious things.</p>
105
+
<p>It is also important to emphasize that, although all the codes are mine, the rest of the staff team helped me with 3D models and sprites for the items.</p>
106
+
<h2id="t3-struct">Example of one of my codes used on the server</h2>
107
+
<p>Here is an example of a routine script running a “clearlag”, checking entities every X time and deleting them from the world. You can find it in the <atarget="_blank" href="https://github.com/0x50F14/whispersjs">github repository</a> in the file <code>/startup_scripts/clearLag/clearlag.js</code>.</p>
108
+
<preclass="js"><code>// Interval for each cleanup and time until the cleaning occurs
109
+
let Interval = 15;
110
+
let cleaningTime = 1200 * Interval;
111
+
112
+
// Cleaning timer setter
113
+
let timerCheck = 1200;
114
+
115
+
// Notification times, times the user want to get the message how many minutes are left until Clearlag clears
116
+
const notifications = [5, 1];
117
+
// Second notification times, times showing user how many seconds are left until item clear
118
+
const second_notifications = [5, 4, 3, 2, 1];
119
+
120
+
let round = 0;
121
+
let lastClearLagResult = Utils.newList();
122
+
let lastTotalClearLagResult = Utils.newCountingMap();
0 commit comments