From a25fa858685de1bd911e6528070d471b2546dc2a Mon Sep 17 00:00:00 2001 From: Travis Weir Date: Thu, 8 Sep 2022 20:28:38 -0500 Subject: [PATCH] Update docs for newer Python, fix message content intent --- README.md | 12 +++++++----- mathbot/bot.py | 4 +++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 8e67e5e..a8fef60 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ It's primary features are: - Querying Wolfram|Alpha - A Turing complete calculator -The bot is currently developed for python `3.6.4`. +The bot is currently developed for python `3.8`. ## Links @@ -20,8 +20,9 @@ The bot is currently developed for python `3.6.4`. git clone https://github.com/DXsmiley/mathbot.git cd mathbot cp mathbot/parameters_default.json mathbot/parameters.json -pipenv --python 3.6 -pipenv install --skip-lock +python3 -m venv venv +source venv/bin/activate +pip install -Ur requirements.txt ``` Then open parameters.json and change `tokens` to the token of the bot used for development. Optionally change the other parameters. @@ -36,8 +37,9 @@ Then navigate into the `mathbot` directory and run the bot with `python entrypoi git clone https://github.com/DXsmiley/mathbot.git cd mathbot cp mathbot/parameters_default.json mathbot/parameters.json -pipenv --python 3.6 -pipenv install --dev --skip-lock +python3 -m venv venv +source venv/bin/activate +pip install -Ur requirements.txt ``` Then open parameters.json and change `tokens` to the token of the bot. Change `release` to `development`. Optionally change the other parameters. diff --git a/mathbot/bot.py b/mathbot/bot.py index e108129..6be9698 100755 --- a/mathbot/bot.py +++ b/mathbot/bot.py @@ -49,9 +49,11 @@ def __init__(self, parameters): shard_count = parameters.get('shards total') shard_ids = parameters.get('shards mine') print(f'Starting bot shards {shard_ids} ({shard_count} total)') + intents = discord.Intents.default() + intents.message_content = True super().__init__( command_prefix=_determine_prefix, - intents=discord.Intents.default() + intents=intents ) self.parameters = parameters self.release = parameters.get('release')