Skip to content

Commit

Permalink
fixed channel information getting and added nerimity beta invite
Browse files Browse the repository at this point in the history
  • Loading branch information
Deutscher775 committed Nov 19, 2024
1 parent 14ceca6 commit 2604536
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ def invite(platform: str, token: Annotated[str, fastapi.Query(max_length=85)] =
return fastapi.responses.RedirectResponse(status_code=301, url="https://www.guilded.gg/b/00c19caa-e176-45f6-b1f6-7bee5ba73db9")
elif platform == "nerimity":
return fastapi.responses.RedirectResponse(status_code=301, url="https://nerimity.com/bot/1570083353837875200?perms=202")
elif platform == "nerimity-beta":
return fastapi.responses.RedirectResponse(status_code=301, url="https://nerimity.com/bot/1528027197628129280?perms=202")
elif platform == "discord-beta" and token in beta_users.TOKENS:
return fastapi.responses.RedirectResponse(status_code=301, url="https://discord.com/oauth2/authorize?client_id=1230579871059804280&permissions=138046467089&scope=applications.commands+bot")
elif platform == "guilded-beta" and token in beta_users.TOKENS:
Expand Down
4 changes: 2 additions & 2 deletions src/astroidapi/get_channel_information.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ async def from_discord_id(cls, channel_id: int):
try:
async with aiohttp.ClientSession() as session:
headers = {
"Authorization": f"Bot {config.DISCORD_TOKEN}"
"Authorization": f"Bot {config.BETA_DISCORD_TOKEN}"
}
async with session.get(f"https://discord.com/api/v9/channels/{channel_id}", headers=headers) as resp:
data = await resp.json()
Expand Down Expand Up @@ -60,7 +60,7 @@ async def from_revolt_id(cls, channel_id: str):
try:
async with aiohttp.ClientSession() as session:
headers = {
"X-Session-Token": f"{config.REVOLT_TOKEN}"
"X-Bot-Token": f"{config.REVOLT_TOKEN}"
}
async with session.get(f"https://api.revolt.chat/channels/{channel_id}", headers=headers) as resp:
print(await resp.text())
Expand Down

0 comments on commit 2604536

Please sign in to comment.