Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions dexscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
dir_type = "ballsdex" if os.path.isdir("ballsdex") else "carfigures"

if dir_type == "ballsdex":
from ballsdex.core.models import Ball, Economy, GuildConfig, Regime, Special, User
from ballsdex.core.models import Ball, Economy, GuildConfig, Regime, Special
from ballsdex.settings import settings
else:
from carfigures.core.models import Admin as User
from carfigures.core.models import Car as Ball
from carfigures.core.models import CarType as Regime
from carfigures.core.models import Country as Economy
Expand All @@ -39,7 +38,6 @@
FILENAME_RE = re.compile(r"^(.+)(\.\S+)$")

MODELS = {
"user": [User, "USERNAME"],
"guildconfig": [GuildConfig, "ID"],
"ball": [Ball, "COUNTRY"],
"regime": [Regime, "NAME"],
Expand Down Expand Up @@ -340,7 +338,7 @@ async def create_model(self, model, identifier, yield_creation):

fields[key] = 1

if key in ["country", "full_name", "catch_names", "name", "username"]:
if key in ["country", "full_name", "catch_names", "name"]:
fields[key] = identifier
elif key == "emoji_id":
fields[key] = 100**8
Expand Down
4 changes: 2 additions & 2 deletions installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ async def error(self, error, exception=False):

description = (
f"Please submit a [bug report]"
f"(<https://github.com/{GITHUB[0]}/issues/new/choose>) to the GitHub page"
f"(<https://github.com/{config.github[0]}/issues/new/choose>) to the GitHub page"
)

if exception:
Expand All @@ -93,7 +93,7 @@ async def error(self, error, exception=False):
fields = {"embed": self.embed}

if exception:
fields["file"] = discord.File(StringIO(error), filename="DexScript.log")
fields["attachments"] = [discord.File(StringIO(error), filename="DexScript.log")]

await self.message.edit(**fields)

Expand Down