print to stderr not stdout

This commit is contained in:
xenofem 2020-04-03 18:37:49 -04:00
parent 912b56a03b
commit bead178487

View file

@ -1,5 +1,6 @@
import discord
import random
import sys
client = discord.Client()
@ -44,7 +45,7 @@ def dice(count):
@client.event
async def on_ready():
print('logged in as {0.user}'.format(client))
print('logged in as {0.user}'.format(client), file=sys.stderr)
await client.change_presence(activity=discord.Game('!n for n dice, !0 for chance die'))
@client.event
@ -56,7 +57,7 @@ async def on_message(message):
try:
count=int(message.content.split()[0][1:])
except ValueError:
print('error parsing message {0}'.format(message.content))
print('error parsing message {0}'.format(message.content), file=sys.stderr)
return
if count > 69: