arghblargh / QueueBot

Queue management bot for Twitch.tv chat
4 stars 1 forks source link

[Error] Queue Clear #3

Open kyroskoh opened 9 years ago

kyroskoh commented 9 years ago

I received an error when I am performing !queue clear.

[Scenario 1]

:kyroskoh!kyroskoh@kyroskoh.tmi.twitch.tv PRIVMSG #loserfruit :!queue new

send: New group: :kyroskoh!kyroskoh@kyroskoh.tmi.twitch.tv PRIVMSG #loserfruit :!queue clear Traceback (most recent call last): File "QueueBot.py", line 433, in main() File "QueueBot.py", line 422, in main channel_info[channel].queue_clear() File "QueueBot.py", line 100, in queue_clear self.queue.clear() AttributeError: 'list' object has no attribute 'clear'


[Scenario 2]

:kyroskoh!kyroskoh@kyroskoh.tmi.twitch.tv PRIVMSG #loserfruit :!queue add

send: kyroskoh added to queue :kyroskoh!kyroskoh@kyroskoh.tmi.twitch.tv PRIVMSG #loserfruit :!queue new send: New group: kyroskoh himekyros !himekyros @himekyros.tmi.twitch.tv PRIVMSG #loserfruit :!queue add send: himekyros added to queue :kyroskoh!kyroskoh@kyroskoh.tmi.twitch.tv PRIVMSG #loserfruit :!queue remove send: Replaced kyroskoh with himekyros :kyroskoh!kyroskoh@kyroskoh.tmi.twitch.tv PRIVMSG #loserfruit :!queue players send: Current Player(s): himekyros :kyroskoh!kyroskoh@kyroskoh.tmi.twitch.tv PRIVMSG #loserfruit :!queue clear Traceback (most recent call last): File "QueueBot.py", line 433, in main() File "QueueBot.py", line 422, in main channel_info[channel].queue_clear() File "QueueBot.py", line 100, in queue_clear self.queue.clear() AttributeError: 'list' object has no attribute 'clear'


May I know what is the steps to be taken to create a new group, add an user to the queue, choose someone from the queue to the group.

arghblargh commented 9 years ago

Are you on Python 3.3 or later? The list.clear() function was added in 3.3.

To create a new group:

  1. Add user(s) to queue with !queue add
  2. Create a group with !queue new

The size of the group is determined by !queue setsize n

kyroskoh commented 9 years ago

I have switched my python version to 3.3.5.