I realized having to host this potentially indefinitely might not be the best idea, so I am going to shut down this gitea instance eventually.
You’ll have time, at least until the end of 2022, probably longer, but please just get all your stuff somewhere safe in case we ever disappear.
If any of your build scripts rely on my (kageru’s) projects hosted here, check my Github or IEW on Github for encoding projects. If you can’t find what you’re looking there, tell me to migrate it.

split messages in discord notifications

master
kageru 3 years ago
parent ad3dcc2fdd
commit c1470a1103

@ -7,9 +7,17 @@ async def main(target, message):
client = Client()
await client.login('your token')
user = await client.fetch_user(target)
await user.send(message)
if len(message) > 250:
for i in range(len(message) // 1900 + 1):
await user.send(f'```{message[1900*i:1900*(i+1)]}```')
print(f'```{message[1900*i:1900*(i+1)]}```')
else:
await user.send(message)
await client.logout()
await client.close()
if __name__ == '__main__':
loop = asyncio.get_event_loop().run_until_complete(main(*argv[1:]))
try:
loop = asyncio.get_event_loop().run_until_complete(main(*argv[1:]))
except Exception:
pass

Loading…
Cancel
Save