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-HERE
with your Discord Bot Token.- Instructions on how to create a Discord bot can be found here.
- Replace
YOUR-CHANNEL-ID-HERE
with 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
: ReplaceCHANNEL0
throughCHANNEL7
with your specific channel names. - Line
146
: ReplaceYOUR-TZ
with your timezone.- A list of available timezones can be found here.
- Lines
267-272
: ReplaceCHANNEL-NAME-0
andchannelname0
with your specific channel name. - Lines
277-282
: ReplaceCHANNEL-NAME-1
andchannelname1
with your specific channel name. - Lines
287-292
: ReplaceCHANNEL-NAME-2
andchannelname2
with your specific channel name. - Lines
297-302
: ReplaceCHANNEL-NAME-3
andchannelname3
with your specific channel name. - Lines
307-312
: ReplaceCHANNEL-NAME-4
andchannelname4
with your specific channel name. - Lines
317-322
: ReplaceCHANNEL-NAME-5
andchannelname5
with your specific channel name. - Lines
327-332
: ReplaceCHANNEL-NAME-6
andchannelname6
with your specific channel name. - Lines
337-342
: ReplaceCHANNEL-NAME-7
andchannelname7
with 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.)
/sendid
followed by the node ID to send a direct message to that node. For example,/sendid !7c5acfa4
./sendnum
followed by the node number to send a direct message to that node. For example,/sendnum 2086326180
./active
to show a list of active nodes seen in the last 15 minutes./channelname0
to send a message in channel 0./channelname1
to send a message in channel 1./channelname2
to send a message in channel 2./channelname3
to send a message in channel 3./channelname4
to send a message in channel 4./channelname5
to send a message in channel 5./channelname6
to send a message in channel 6./channelname7
to send a message in channel 7./help
to show a list of available bot commands.
The idea for this bot was inspired by the Meshtastic Discord Bridge created by raudette.