This Discord bot is used to communicate directly with the Meshtastic network using a Meshtastic compatable device.
Having a Discord bot directly connected to the Meshtastic network allows users to test their devices and get instant feedback on whether another device has received their message. It also allows the user to communicate on their local network no matter where they are in the world.
The following must be established in order for the bot to operate successfully:
- A Meshtastic compatable device must be connected via a serial connection to the device operating the bot.
- A list of Meshtastic compatable devices can be found here.
- Update the variables outlined in the next section.
Update the following variables in the config.json file:
- Replace
YOUR-TOKEN-HEREwith your Discord Bot Token.- Instructions on how to create a Discord bot can be found here.
- Replace
YOUR-CHANNEL-ID-HEREwith the channel ID from the server the bot will be communicating in.- Instructions on how to get the channel ID can be found here.
Update the following variables in the main.py file:
- Line
37: ReplaceCHANNEL0throughCHANNEL7with your specific channel names. - Line
146: ReplaceYOUR-TZwith your timezone.- A list of available timezones can be found here.
- Lines
267-272: ReplaceCHANNEL-NAME-0andchannelname0with your specific channel name. - Lines
277-282: ReplaceCHANNEL-NAME-1andchannelname1with your specific channel name. - Lines
287-292: ReplaceCHANNEL-NAME-2andchannelname2with your specific channel name. - Lines
297-302: ReplaceCHANNEL-NAME-3andchannelname3with your specific channel name. - Lines
307-312: ReplaceCHANNEL-NAME-4andchannelname4with your specific channel name. - Lines
317-322: ReplaceCHANNEL-NAME-5andchannelname5with your specific channel name. - Lines
327-332: ReplaceCHANNEL-NAME-6andchannelname6with your specific channel name. - Lines
337-342: ReplaceCHANNEL-NAME-7andchannelname7with your specific channel name.
If the above channel names have been updated, the commands listed in the help menu must also be updated starting on line 211.
Once the above variables have been updated, run the bot using the following commands: (Note that if you have changed the above channel name variables, the channel commands below will change.)
/sendidfollowed by the node ID to send a direct message to that node. For example,/sendid !7c5acfa4./sendnumfollowed by the node number to send a direct message to that node. For example,/sendnum 2086326180./activeto show a list of active nodes seen in the last 15 minutes./channelname0to send a message in channel 0./channelname1to send a message in channel 1./channelname2to send a message in channel 2./channelname3to send a message in channel 3./channelname4to send a message in channel 4./channelname5to send a message in channel 5./channelname6to send a message in channel 6./channelname7to send a message in channel 7./helpto show a list of available bot commands.
The idea for this bot was inspired by the Meshtastic Discord Bridge created by raudette.





