About This File
tility bot for IRC. Runs on HexChat 2.10 and later versions.
⚠️ This project has been discontinued. If you need a bot for HexChat or IRC, you can hire me.
However, don't ask me to adapt or update this project.
How to clone the bot
First of all, make sure you have Python installed and Python Plugin installed with the HexChat your bot will use.
Second, create an account on Freenode for your bot. Ask for a cloak to your name on the #Freenode channel.
Finaly, set HexChat server configuration to autoconnect and autologin your bot. Use SSL to secure your connexion.
After that, change the bot files to suite your needs:
-
Copy the code and the json files into
.config/hexchat/addons/(Linux) or%appdata%\HexChat\addons\(Windows). This will make HexChat run the code automatically on startup. -
Rename the files depending on your bot name and change settings in the files:
-
_data.jsonfile:
Rename the bot (
bot:name).Set a description for the bot (
bot:description).Name the version (bot:version_info:name and
:link).The
:cmd_defaultoption is a kameo-like that creates a command which displays information on the current version (there's are two commands there, one that displays text and another that makes a/meaction).By default, triggers are:
+for user commands,%for admin commands,#for special user commands,+for help commands and*for API-dependant commands. You can change that in triggers property.Set the admins, the special users, the
tip_paramsand therain_params.
timer_first_timoutis a timeout that launches only once after the bot registers and loads. Set it to 2 minutes or less if you are sure that the bots connects quickly.timer_timeoutis by default set to 10 minutes. It checks for the balance and regains the bot original nickname.
rain_params:rain_timeoutdefines how much time one can be inactive and stays in the rain list.As the bot receives tips and tips randomly,
tip_timeoutis used to automatically keep tips if the used does not use the coins. Default to 5 minutes.Don't change
tip_manage_commandsunless you are willing to change the code that manages the tips.If you are willing to use the Microsoft Translation API, register on api.microsofttranslator.com and get a "client id" and a "client secret". Set them in
ms_params:ms_client_idand:ms_client_secret.Sets the reminders in
remindersas you wish. Give them a name, a message to post, a timeout and list the channels where the message will be periodically posted.
-
_users.jsonfile:
Keep the same data structure and define user data. Examples are given. Don't forget to set data for your bot. Set
data:donationto the address you want people to send donations to. It will be displayed when someone uses the donate command.The
datapart lists data for pools and addie, it is used when querrying a command with themeargument. Next versions will let users define their own data.
-
.pyfile:
Define the
SYSTEM,PYTHONandLOCALconstants. Change thedata_filepaths.
help_apiallows you to add help for api-dependant commands.You can add simple commands by adding entries to
get_msgandget_action.
get_msgcreates commands that sends message to the channel where the trigger is used.:wordsis a string of the message to send to the channel.:descris an array of lines that will be displayed as help to the command.
get_actioncreates /me-like actions on the channel where the trigger is used.:wordsis an array of two elements. The first is the infinitive form and the second the form in the 3rd person of singular, Present tense.:supplis an array of supplements that will be randomly shown to complete the action; use[""]if you want nothing to be shown after the action.:reason_nodescribes the reason why the action cannot be performed on ChanServ.:descris an array of lines to show in help on the command.
get_reactioncreates reactions to strings in what users say in a channel.Finaly, you can search for "Dj4x" or "dj4x" in the code and replace it with your bot's name. This will be fixed in the following versions.
Important
Microsoft Translator has moved to Azure
Microsoft recommands that beginning 2017-01-01, subscribers to Microsoft Translator Text move to Azure DataMarket to avoid service disrption. For more information, see Microsoft Translator has moved to Azure on UserVoice.