if 'output_type' in obj and obj['output_type'] == 'discord':
print('Received a horn for us! {}'.format(msg.body))
- asyncio.ensure_future(self.horn(dict(sample_name=obj['sample_name']), properties=None))
+ asyncio.ensure_future(self.horn(obj, properties=None))
else:
print('Received a horn not for us: {}'.format(msg.body))
if obj['sample_name'] == 'random':
sample_name = self.get_sample_name()
elif obj['sample_name'] == 'terminate':
- self.terminate_all()
+ self.terminate_all(guild=discord.utils.get(self.guilds, id=obj['guild']))
return None
else:
sample_name = '{}/{}'.format(self.config['airhorn_directory'], obj['sample_name'])
traceback.print_exc()
print('Error object was: {}'.format(obj))
else:
- await self.msg_play_filename(sample_name, guild_id=336396117791211522, exclusive=exclusive)
+ await self.msg_play_filename(sample_name, guild_id=obj['guild'], exclusive=exclusive)