Example #1
0
    async def convert(self, ctx, argument):
        valid = rally_api.valid_coin_symbol(argument)
        if not valid:
            raise errors.InvalidCoin("Invalid coin symbol")

        data = rally_api.get_price_data(argument)
        return {"symbol": argument, "data": data}
Example #2
0
 async def convert(self, ctx, coin_name):
     valid = rally_api.valid_coin_symbol(coin_name)
     if not valid:
         raise errors.BadArgument("Coin '" + coin_name +
                                  "' does not seem to exist.")
     return coin_name
Example #3
0
async def is_valid_coin(ctx, coin_name):
    valid = rally_api.valid_coin_symbol(coin_name)
    if not valid:
        await ctx.send("Coin " + coin_name + " does not seem to exist")
        return False
    return True