public bool InitRef(BuildContext context, CallExpression.ClassRef @ref) { switch (@ref.RefType) { case CallExpression.ClassRef.TypeId: if (ulong.TryParse(@ref.Value, out ulong id)) { Init(context.Guild.GetChannel(id)); } break; case CallExpression.ClassRef.TypeStr: var chan = context.Guild.Channels.FirstOrDefault(c => c.Name == @ref.Value); if (chan != null) { Init(chan); } break; } return(_channel != null); }
public bool InitRef(BuildContext context, CallExpression.ClassRef @ref) => false;