diff options
author | Luca Matei Pintilie <luca@lucamatei.com> | 2024-08-04 13:53:42 +0000 |
---|---|---|
committer | Luca Matei Pintilie <luca@lucamatei.com> | 2024-08-04 13:53:42 +0000 |
commit | acfbb761379f6f27a1c4740b74ba6758942780fc (patch) | |
tree | b96cb8178531af401f6e73124e2c0350e48427fd /cogs/general.py | |
parent | a739140c048d8dc8222fe529fd35019319c6f3ed (diff) | |
download | steve-bot-acfbb761379f6f27a1c4740b74ba6758942780fc.tar steve-bot-acfbb761379f6f27a1c4740b74ba6758942780fc.tar.gz steve-bot-acfbb761379f6f27a1c4740b74ba6758942780fc.tar.bz2 steve-bot-acfbb761379f6f27a1c4740b74ba6758942780fc.tar.lz steve-bot-acfbb761379f6f27a1c4740b74ba6758942780fc.tar.xz steve-bot-acfbb761379f6f27a1c4740b74ba6758942780fc.tar.zst steve-bot-acfbb761379f6f27a1c4740b74ba6758942780fc.zip |
Containerfile: remove support for trans.py
Diffstat (limited to 'cogs/general.py')
-rwxr-xr-x | cogs/general.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/cogs/general.py b/cogs/general.py index 8f9e680..64e0ab6 100755 --- a/cogs/general.py +++ b/cogs/general.py @@ -550,7 +550,8 @@ class General(commands.Cog): await ctx.send("You need to specify a gamer, gamer")
return
- async with self.bot.session.get(
+ session = aiohttp.ClientSession()
+ async with session.get(
f"https://xbl-api.prouser123.me/profile/gamertag/{gamertag}",
headers={"User-Agent": "mcbeDiscordBot/1.0"},
) as r:
@@ -621,7 +622,8 @@ class General(commands.Cog): await ctx.send("You need to specify a gamer, gamer")
return
- async with self.bot.session.get(
+ session = aiohttp.ClientSession()
+ async with session.get(
f"https://xbl-api.prouser123.me/presence/gamertag/{gamertag}"
) as r:
gamer = json.loads(await r.text())
@@ -708,8 +710,9 @@ class General(commands.Cog): return
body = {"compiler": compiler, "code": code, "save": True}
head = {"Content-Type": "application/json"}
+ session = aiohttp.ClientSession()
async with ctx.typing():
- async with self.bot.session.post(
+ async with session.post(
"https://wandbox.org/api/compile.json",
headers=head,
data=json.dumps(body),
|