Show current driver in [p]debuginfo (#3794)

Co-Authored-By: jack1142 <6032823+jack1142@users.noreply.github.com>
This commit is contained in:
Draper 2020-04-26 15:07:57 +01:00 committed by GitHub
parent f824d09ed3
commit bd3d0dd64d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,6 +21,7 @@ import aiohttp
import discord import discord
import pkg_resources import pkg_resources
from babel import Locale as BabelLocale, UnknownLocaleError from babel import Locale as BabelLocale, UnknownLocaleError
from redbot.core.data_manager import storage_type
from . import ( from . import (
__version__, __version__,
@ -1758,7 +1759,7 @@ class Core(commands.Cog, CoreLogic):
else: else:
osver = "Could not parse OS, report this on Github." osver = "Could not parse OS, report this on Github."
user_who_ran = getpass.getuser() user_who_ran = getpass.getuser()
driver = storage_type()
if await ctx.embed_requested(): if await ctx.embed_requested():
e = discord.Embed(color=await ctx.embed_colour()) e = discord.Embed(color=await ctx.embed_colour())
e.title = "Debug Info for Red" e.title = "Debug Info for Red"
@ -1774,6 +1775,7 @@ class Core(commands.Cog, CoreLogic):
value=escape(sys.executable, formatting=True), value=escape(sys.executable, formatting=True),
inline=False, inline=False,
) )
e.add_field(name="Storage type", value=driver, inline=False)
await ctx.send(embed=e) await ctx.send(embed=e)
else: else:
info = ( info = (
@ -1786,6 +1788,7 @@ class Core(commands.Cog, CoreLogic):
+ "System arch: {}\n".format(platform.machine()) + "System arch: {}\n".format(platform.machine())
+ "User: {}\n".format(user_who_ran) + "User: {}\n".format(user_who_ran)
+ "OS version: {}\n".format(osver) + "OS version: {}\n".format(osver)
+ "Storage type: {}\n".format(driver)
) )
await ctx.send(box(info)) await ctx.send(box(info))