mirror of
https://github.com/brandons209/Red-bot-Cogs.git
synced 2024-06-15 17:05:36 +12:00
minor updates
This commit is contained in:
parent
cba0108466
commit
9d2f381c3e
|
@ -18,5 +18,6 @@
|
||||||
"logging",
|
"logging",
|
||||||
"log",
|
"log",
|
||||||
"activity"
|
"activity"
|
||||||
]
|
],
|
||||||
|
"min_bot_version": "3.3.0"
|
||||||
}
|
}
|
||||||
|
|
|
@ -642,6 +642,24 @@ class MoreAdmin(commands.Cog):
|
||||||
await channel.send(embed=data)
|
await channel.send(embed=data)
|
||||||
|
|
||||||
### DATA LOADING FROM V2, WILL REMOVE LATER ###
|
### DATA LOADING FROM V2, WILL REMOVE LATER ###
|
||||||
|
@commands.command(name="loadcasino")
|
||||||
|
@checks.is_owner()
|
||||||
|
async def loadcasino(self, ctx, *, path: str):
|
||||||
|
import json
|
||||||
|
from redbot.core import bank
|
||||||
|
|
||||||
|
with open(path, "r") as f:
|
||||||
|
settings = json.load(f)
|
||||||
|
|
||||||
|
for guild_id, member_data in settings.items():
|
||||||
|
guild = self.bot.get_guild(int(guild_id))
|
||||||
|
for mid, mdata in member_data["Players"].items():
|
||||||
|
user = guild.get_member(int(mid))
|
||||||
|
try:
|
||||||
|
await bank.deposit_credits(user, mdata["Chips"])
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
|
||||||
@commands.command(name="loadecon")
|
@commands.command(name="loadecon")
|
||||||
@checks.is_owner()
|
@checks.is_owner()
|
||||||
async def load_econ(self, ctx, *, path: str):
|
async def load_econ(self, ctx, *, path: str):
|
||||||
|
|
Loading…
Reference in a new issue