Use socialscan until sherlock works
This commit is contained in:
parent
52a18a5b52
commit
0fef7c899c
@ -1,5 +1,7 @@
|
|||||||
|
import discord
|
||||||
from redbot.core import Config, commands
|
from redbot.core import Config, commands
|
||||||
from redbot.core.bot import Red
|
from redbot.core.bot import Red
|
||||||
|
from socialscan.util import Platforms, execute_queries, sync_execute_queries
|
||||||
|
|
||||||
|
|
||||||
class Sherlock(commands.Cog):
|
class Sherlock(commands.Cog):
|
||||||
@ -9,15 +11,37 @@ class Sherlock(commands.Cog):
|
|||||||
Less important information about the cog
|
Less important information about the cog
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
platforms = [
|
||||||
|
Platforms.GITHUB,
|
||||||
|
Platforms.GITLAB,
|
||||||
|
Platforms.INSTAGRAM,
|
||||||
|
Platforms.REDDIT,
|
||||||
|
Platforms.SNAPCHAT,
|
||||||
|
Platforms.SPOTIFY,
|
||||||
|
Platforms.PINTEREST,
|
||||||
|
Platforms.TUMBLR,
|
||||||
|
Platforms.TWITTER,
|
||||||
|
Platforms.LASTFM,
|
||||||
|
]
|
||||||
|
|
||||||
def __init__(self, bot: Red):
|
def __init__(self, bot: Red):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.bot = bot
|
self.bot = bot
|
||||||
self.config = Config.get_conf(self, identifier=0, force_registration=True) # TODO: Identifier
|
self.config = Config.get_conf(
|
||||||
|
self, identifier=0, force_registration=True
|
||||||
|
) # TODO: Identifier
|
||||||
|
|
||||||
default_guild = {}
|
default_guild = {}
|
||||||
|
|
||||||
self.config.register_guild(**default_guild)
|
self.config.register_guild(**default_guild)
|
||||||
|
|
||||||
@commands.command()
|
@commands.command()
|
||||||
async def sherlock(self, ctx: commands.Context):
|
async def sherlock(self, ctx: commands.Context, member: discord.abc.User):
|
||||||
|
queries = {member.display_name}
|
||||||
|
if isinstance(member, discord.Member):
|
||||||
|
queries.add(member.nick)
|
||||||
|
queries = list(queries)
|
||||||
|
|
||||||
|
results = await execute_queries(queries=queries, platforms=self.platforms)
|
||||||
|
|
||||||
await ctx.send("Hello world")
|
await ctx.send("Hello world")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user