|
|
|
@ -54,6 +54,11 @@ class MiscReactionsPlugin(Plugin):
|
|
|
|
|
continue
|
|
|
|
|
reactions.append(getattr(self, f"react_with_{reaction}"))
|
|
|
|
|
weights.append(weight)
|
|
|
|
|
# Normalize weights.
|
|
|
|
|
total_weight = sum(weights)
|
|
|
|
|
weights = list(map(lambda w: w / total_weight, weights))
|
|
|
|
|
self.bot.log_d(f"Reactions: {reactions}")
|
|
|
|
|
self.bot.log_d(f"Reaction weights: {weights}")
|
|
|
|
|
return reactions, weights
|
|
|
|
|
|
|
|
|
|
def on_pubmsg(self, event):
|
|
|
|
|