try removing type on sd
All checks were successful
Build and push / changes (push) Successful in 25s
Build and push / Lint-Python (push) Successful in 2s
Build and push / Build-and-Push-Docker (push) Successful in 20s
Build and push / sync-argocd-app (push) Successful in 2s
Build and push / post-status-to-discord (push) Successful in 2s
All checks were successful
Build and push / changes (push) Successful in 25s
Build and push / Lint-Python (push) Successful in 2s
Build and push / Build-and-Push-Docker (push) Successful in 20s
Build and push / sync-argocd-app (push) Successful in 2s
Build and push / post-status-to-discord (push) Successful in 2s
This commit is contained in:
parent
893a4e4adb
commit
c8bf963836
@ -5,11 +5,7 @@ import datetime
|
|||||||
|
|
||||||
def get_player(player):
|
def get_player(player):
|
||||||
player = player.lower()
|
player = player.lower()
|
||||||
url = (
|
url = f"https://api.gametools.network/bf2042/stats/?raw=false&format_values=true&name={player}&platform=pc&skip_battlelog=false"
|
||||||
"https://api.gametools.network/bf2042/stats/?raw=false&format_values=true&name="
|
|
||||||
+ player
|
|
||||||
+ "&platform=pc&skip_battlelog=false"
|
|
||||||
)
|
|
||||||
headers = {
|
headers = {
|
||||||
"User-Agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64)",
|
"User-Agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64)",
|
||||||
"accept": "application/json",
|
"accept": "application/json",
|
||||||
|
@ -23,45 +23,45 @@ class Games(commands.Cog):
|
|||||||
|
|
||||||
return worlds
|
return worlds
|
||||||
|
|
||||||
@commands.slash_command(
|
# @commands.slash_command(
|
||||||
guild_ids=None,
|
# guild_ids=None,
|
||||||
name="ffxiv",
|
# name="ffxiv",
|
||||||
description="Query the game's API for data about a player",
|
# description="Query the game's API for data about a player",
|
||||||
)
|
# )
|
||||||
@option(
|
# @option(
|
||||||
"player_name", description="Your player's first and last name", required=True
|
# "player_name", description="Your player's first and last name", required=True
|
||||||
)
|
# )
|
||||||
async def ffxiv(
|
# async def ffxiv(
|
||||||
self,
|
# self,
|
||||||
ctx: discord.ApplicationContext,
|
# ctx: discord.ApplicationContext,
|
||||||
player_name: str,
|
# player_name: str,
|
||||||
server: discord.Option(
|
# server: discord.Option(
|
||||||
str, autocomplete=discord.utils.basic_autocomplete(get_ffxiv_worlds)
|
# str, autocomplete=discord.utils.basic_autocomplete(get_ffxiv_worlds)
|
||||||
),
|
# ),
|
||||||
):
|
# ):
|
||||||
import ffxiv
|
# import ffxiv
|
||||||
|
|
||||||
try:
|
# try:
|
||||||
embed = ffxiv.make_request(name=player_name.lower(), server=server.lower())
|
# embed = ffxiv.make_request(name=player_name.lower(), server=server.lower())
|
||||||
await ctx.defer()
|
# await ctx.defer()
|
||||||
await ctx.send_followup(embed=embed)
|
# await ctx.send_followup(embed=embed)
|
||||||
except Exception:
|
# except Exception:
|
||||||
await ctx.send(
|
# await ctx.send(
|
||||||
"I encountered an error while searching for that player.\nPlease check that your player name and server are spelled correctly"
|
# "I encountered an error while searching for that player.\nPlease check that your player name and server are spelled correctly"
|
||||||
)
|
# )
|
||||||
|
|
||||||
@commands.slash_command(
|
# @commands.slash_command(
|
||||||
guild_ids=None,
|
# guild_ids=None,
|
||||||
name="2042",
|
# name="2042",
|
||||||
description="Query Battlefield 2042's API for data about a player",
|
# description="Query Battlefield 2042's API for data about a player",
|
||||||
)
|
# )
|
||||||
@option("player_name", description="Your Origin/EA account name", required=True)
|
# @option("player_name", description="Your Origin/EA account name", required=True)
|
||||||
async def battlefield(self, ctx: discord.ApplicationContext, player_name: str):
|
# async def battlefield(self, ctx: discord.ApplicationContext, player_name: str):
|
||||||
import battlefield
|
# import battlefield
|
||||||
|
|
||||||
await ctx.defer()
|
# await ctx.defer()
|
||||||
embed = battlefield.get_player(player=player_name.lower())
|
# embed = battlefield.get_player(player=player_name.lower())
|
||||||
await ctx.send_followup(embed=embed)
|
# await ctx.send_followup(embed=embed)
|
||||||
|
|
||||||
|
|
||||||
def setup(bot):
|
def setup(bot):
|
||||||
|
@ -18,7 +18,6 @@ class StableDiffusion(commands.Cog):
|
|||||||
@option(
|
@option(
|
||||||
"positive_prompt",
|
"positive_prompt",
|
||||||
description="The positive prompt to pass to stable diffusion",
|
description="The positive prompt to pass to stable diffusion",
|
||||||
input_type="str",
|
|
||||||
requred=True,
|
requred=True,
|
||||||
)
|
)
|
||||||
@option(
|
@option(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user