Skip to content

Conversation

@jlaluces123
Copy link

No description provided.

Copy link

@TheDeterminator TheDeterminator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jonathan, you have a lot of good work here! Try to go continue pushing yourself with stretch goals and extra features if you find time to look more at this project. Great job!

def say(request):
# IMPLEMENT
return JsonResponse({'error':"Not yet implemented"}, safe=True, status=500)
player = request.user.player # --> Grab player

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good comment here, would be nice to have a few more throughout your code.

room = player.room() # --> Grab room
currentPlayerUUIDs = room.playerUUIDs(player_id)
for uuid in currentPlayerUUIDs:
pusher.trigger(f'p-channel-{uuid}', u'broadcast', {'say': f'{player.user.username} says {response}'})

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this broadcasts an alert to the player who said the message too, but ideally you would want to exclude the player who performed say from the list of who receives the alert. This differentiates "say" from "shout"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants